Fix php, jquery code for magento 1.9 store

I have a magento 1.9 store that I have made a custom piece of code to show a 360deg image in an iframe.

I have managed to get the iframe to show on the product page but it has a few issues that I need help to fix. this should be fairly easy but a little past my novice rank with coding.

The current code has a foreach loop that shows the images for any specific product.

1. I need the link for the image to show at the end of the foreach loop.

My attempts to just add after <?php endforeach ?> ends with the thumbnail endlessly looping as it thinks its still part of the carousel css. Adding it outside makes it not part of the carousel.

I need it to add to the very end of the foreach loop as the last item if the statement exists.

2. once the thumbnail is loaded i would like the link to the iframe show in the .product-image div replacing the default image.

here is the code that I currently have )but not working yet)

I am attempting to add a couple of new elements to a Magento 1.9 image carousel on the products page.

Ideally I would like to add at the end of the foreach loop but whatever I do it just keeps duplicating the div...

The second issue is that I am having trouble getting the content of the div to show in the class="product-image" div on the product page.

My goal is to show thumbnail image at the end of the loop array and when you click on the thumbnail image it shows the content of the iframe in the div "product-image".

I have tried various bits of JavaScript but I can't get it to work. Also after trying to add to the end of the loop I have just ended up putting it on the outside of the div as there is other jQuery actions going on here that are forcing the new div I add after endforeach to duplicate endlessly.


show thumbnail at end of loop

link on thumbnail shows iframe in <div class="product-image">

Here is the code I have hacked... You must excuse me as I am complete novice at this and can read PHP Java ok but creating new code is a different story.

<div class="more-views additional-carousel">


$sliderFor = 4;

$productCount = count($this->getGalleryImages());


<div id="additional-carousel" class="<?php if ($productCount >= $sliderFor){?>product-carousel<?php }else{?>products-grid<?php }?> <?php if ($productCount <= 1): ?>mobile-tablet<?php endif; ?>">

<?php foreach ($this->getGalleryImages() as $_image): ?>

<div class="slider-item">

<div class="product-block">

<a href='<?php echo $this->helper(' catalog/image ')->init($_product, 'image ', $_image->getFile())->resize(768);?>' class='cloud-zoom-gallery lightbox-group' title='<?php echo $this->escapeHtml($_image->getLabel()) ?>' rel="useZoom: 'zoom1', smallImage: '<?php echo $this->helper('catalog/image')->init($_product, 'image', $_image->getFile())->resize(768);?>' ">

<img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(768); ?>" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />




<?php endforeach; ?>


<!-- if spinzam id exists in attributes-->

<?php if ($_product->getData("spinzam_id") == true):?>

<!-- thumbnail for spinzam link-->

<div class="slider-item">

<div class="product-block">

<a href="#" onclick="??"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(150); ?>"/>

<div class="uk-overlay uk-position-bottom product-block">






<!--content to add to .product-image div-->

<div id="spinzam" style="display:none;"><iframe src="[login to view URL]<?php echo $_product->getData(" spinzam_id ")?>" scrolling="no" style="max-width:100%; max-height:100vw;"></iframe>


<?php endif;?>


Квалификация: PHP, Magento, Javascript, CSS, jQuery / Prototype

Показать больше php code magento cms, magento add product store php code, jquery timetable php source code, magento 1 jquery in phtml, magento 2 jquery define, magento 2 speed optimization steps, jquery script magento 2, magento 2 speed optimization extension, magento 1 jquery, magento 1.9 speed optimization, magento 2 jquery, video chat script php jquery code, code php shopping cart magento, multiple choice php jquery code, run php code magento, php code collect data user store, cheap magento 1.9 2 templates, magento 1.9 to 2, magento, magento 1.9.2

О работодателе:
( 15 отзыв(-а, -ов) ) Brisbane, Australia

ID проекта: #20439202



Hello, I have gone through your requirements as you are looking for the Full Stack developer. I have a +8 year of experience working with magento php with all other cms . I have knowledge of HTML, CSS, jQuery, A Больше

$70 AUD за 2 дней(-я)
(204 отзывов(-а))

9 фрилансеров(-а) в среднем готовы выполнить эту работу за $50


Hello there, I am interested and ready to start. I am a professional of back-end and front-end developments, and my skills are php, Laravel, Python, Angular, React, javascript, etc. And I have rich experiences in th Больше

$30 AUD за 1 день
(260 отзывов(-а))

Hello sir. I have good skills and experiences as you requested on your project. You can see my results as follow. https://www.freelancer.com/u/leemilun?w=f [login to view URL] [login to view URL] https://penguin Больше

$20 AUD за 7 дней(-я)
(56 отзывов(-а))

Hello Sir, I have read your job description regarding I have 6+ year of experience in this field. I have strong expertise to accomplish this project in decided time frame. Let's discuss in detail so that we never Больше

$70 AUD за 3 дней(-я)
(122 отзывов(-а))

Hi. thanks for your posting. I'm very happy to have a chance of bidding your project. I have experience in development of the projects like yours If you hire me, I'll do my best for your project and finish greatly in a Больше

$30 AUD за 7 дней(-я)
(13 отзывов(-а))

Hello, I would like to thank you for considering my candidature for this job. I have analyzed your requirement for a PHP developer who can help to Fix php and jquery code for magento 1.9 store. I am having 5+ year e Больше

$100 AUD за 2 дней(-я)
(27 отзывов(-а))

Hello, “I’m interested in the position of "Fix php, jquery code for magento 1.9 store" you recently posted. I am dealing with Magento projects with the last 6 years. Please share the details with me & we are good to g Больше

$90 AUD за 7 дней(-я)
(3 отзывов(-а))

Hey, I am a Senior Web Designer & Developer and I have over 3 years of experience in UI/UX Designing, HTML5/CSS3, JavaScript, JQuery, Bootstrap, WordPress & PHP, I am online and available let's discuss the project. T Больше

$20 AUD за 7 дней(-я)
(4 отзывов(-а))

Hi, How are you doing today? I'm an expert who has 8+ years of experience with web development and design. I'm confident in HTML, CSS, Javascript, jQuery, Cpanel, SEO optimization, Plugins, and PHP. I've read your de Больше

$20 AUD за 7 дней(-я)
(0 отзывов(-а))