Skip Navigation

[Resolved] replace product featured image with iframe

This support ticket is created 7 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by Ido Angel 7 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#469024

Hey,

I'm trying to replace the featured image in the product page with an iframe.
I created a taxonomy for all products which is a link to the iframe.
I know how to show this iframe if i create a content template for products:

<iframe src="[wpv-post-taxonomy type='360-link' format='name']" width="500" height="800" frameBorder="0"></iframe>

But I want to:

1) not create a whole new product template. Is it possible to copy the woocommerce default template and just "tamper" with it a little?

2) not make this iframe standalone from product images, but instead replace the featured image with it.

Any ideas?

Thanks!

Ido

#469252

Dear Ido,

There isn't such kind feature within within Views or Types.
You will need to create custom theme file for it, and it will take effect on the default style of taxonomy "360-link" archive page.
https://toolset.com/documentation/customizing-sites-using-php/creating-taxonomy-term-archives/

If you only need a popup windows, I suggest you try with wordpress built-in JS framework lightbox:
see similar thread:
https://toolset.com/forums/topic/is-there-simple-way-to-have-lightbox/#post-34655

#469255

thanks, but i'm not sure i was understood completely 🙂
i don't want a popup, nor do i need a taxonomy archive.
the taxonomy "360 link" is just an adress which i wrap in an iframe like this:

<iframe src="[wpv-post-taxonomy type='360-link' format='name']" width="500" height="800" frameBorder="0"></iframe>

giving me something like this:

hidden link

let's say i need to create an all-from-scratch single product template (which is ok). i just want to know if i can either:

1. you see under the 350 image, there's the regular image gallery of the product. if only i could replace the big image with my iframe...
2. this is less good, but i can live with it: create the image gallery differently, so that it wouldn't have the big image, only small images with lightbox.

thanks dear Luo!

Ido

#469309
6.JPG

I am not sure what you are going to achieve

Q1) i need to create an all-from-scratch single product template
Please check our document:
https://toolset.com/documentation/customizing-sites-using-php/creating-templates-single-custom-posts/
Creating Templates for Single Custom Posts

Q2) you see under the 350 image, there's the regular image gallery of the product. if only i could replace the big image with my iframe...
I searched in that page, but can not find the keyword "350"
See screenshot 6.JPG
I am not sure which one is the "big image"? which iframe src do you want to use?
If the "big image" is setup by other plugin/theme, I suggest you locate the source of "big image", and replace it with what you want.
and the shortcode [wpv-post-taxonomy type='360-link' format='name'] will output the term name, the result isn't valid URLs, so I don't think you can use it as the "src" attribute of "iframe" tag.
see our document::
https://toolset.com/documentation/views-shortcodes/#wpv-post-taxonomy

Q3) create the image gallery differently, so that it wouldn't have the big image, only small images with lightbox.
Same as above, you can locate the source of "big image", and replace it with what you want, and it depends on yourself.

#469326

sorry, I meant 360. as is 360 degrees image.

i know how to create a single post template.

the iframe code is working, otherwise you wouldn't see the 360 image on the site.

the "big image" is the large image inside the gallery under the rotating 360 image. there's a big image with 4 images under it. the views shortcode for product image is one:

[wpv-woo-product-image size='shop_thumbnail' output='' enable_third_party_filters='yes' gallery_on_listings='yes']

it creates the gallry with 1 big image and 4 thumbnail images below. i can't tell it to replace ONLY the large image with my iframe code.

#469695

For your question:
i can't tell it to replace ONLY the large image with my iframe code.
Since you are using Views shortcode [wpv-woo-product-image] to output the image gallery, please check our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-product-image
There isn't any feature to replace the large image with your iframe code.
So it is not possible within shortcode [wpv-woo-product-image].

But you can create your own shortcode to output the iframe code, and it needs custom PHP codes, More help:
add_shortcode()
https://codex.wordpress.org/Function_Reference/add_shortcode

#470766

thx.
i finally got it to work with a plugin which calls to replace featured images with video - and instead the video iframe, i gave it the 360 imgae iframe.
ido

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.