0

In product details page I have video related to the product along with the thumbnail images. The video always comes at the last. I want to display the video as second link in the thumbnail images. What changes should I do to do that?

I get the video through attribute at backend. This is my code to display it in details page:

<?php if($_product->getVideoEmbeded()): ?>
        <div id="video_frame" style="display: none;width: 100%; overflow: hidden; position: absolute;top: 0;left: 0;"><?php echo $_product->getVideoEmbeded(); ?></div>
<?php endif; ?>

And here is the code to change the base image with the video:

<?php if($_product->getVideoEmbeded()): ?>
            <li class="item"><a href="javascript:void(0)" onClick="changemainimage('<?php echo $prurl  ?>','vdionly')" class="video_link " id="video_link"></a> </li>
<?php endif; ?>
4
  • How do you upload the product video ?
    – Mujahidh
    Jan 20, 2016 at 12:04
  • Kindly see the edited question.
    – Ramya
    Jan 20, 2016 at 12:14
  • can you view your video in the product details page?
    – Mujahidh
    Jan 20, 2016 at 12:17
  • yes I can view. I want to display my video as First or second one in thumbnail images.
    – Ramya
    Jan 20, 2016 at 12:27

1 Answer 1

1
  1. Just Cut the code and pasted it before the code which displayed the image.
  2. Now the video is displayed in first position.

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.