Forums / Templates, Stylesheets, Page Layout / iFrames in product description -- how do I make it recognize the selected product?

iFrames in product description -- how do I make it recognize the selected product?

Locked

Views: 1,481

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
28 Mar 2008, 12:20 AM
#1
judah avatar

judah

New Zenner

Join Date:
Nov 2007
Posts:
68
Plugin Contributions:
0

iFrames in product description -- how do I make it recognize the selected product?

I am adding an iFrame in my product description. I am letting customer view some of the attribute that I will have available. In the iFrame, it is loading the artwork I am selling and I am giving them different frames to look at around the art work.

This is what I need:
I have to pull the product that I am seeing into the other page (Which is actually loaded on the same page) I need to connect this page to the database and pass the prod ID to it so that the correct picture will get framed in that windo. How do I connect one of my pages to ZenCart and pull the image.

Everything is working so far, but this

X|X|X|X|X|X|X|X|X|X|X|X|X|

Judah

WORK YOUR BUSINESS LIKE IT IS ALL UP TO YOU....PRAY FOR YOUR BUSINESS LIKE IT IS ALL UP TO GOD
QUOTE BY: UNKNOWN

28 Mar 2008, 4:08 AM
#2
judah avatar

judah

New Zenner

Join Date:
Nov 2007
Posts:
68
Plugin Contributions:
0

Re: iFrames in product description -- how do I make it recognize the selected product?

Here is my example:

http://bethelframing.com/store/index.php?main_page=product_info&cPath=3_5&products_id=6

The picture that is in the frame is supposed to be the print on the product page. It is static now I want to make it dynamic and change with the product.

X|X|X|X|X|X|X|X|X|X|X|X|X|

Judah

WORK YOUR BUSINESS LIKE IT IS ALL UP TO YOU....PRAY FOR YOUR BUSINESS LIKE IT IS ALL UP TO GOD
QUOTE BY: UNKNOWN

29 Mar 2008, 1:40 AM
#3
judah avatar

judah

New Zenner

Join Date:
Nov 2007
Posts:
68
Plugin Contributions:
0

Re: iFrames in product description -- how do I make it recognize the selected product?

Can anyone tell me the connections string, file or what ever I need to work on this myself. THe way it looks is noone wants to take a shot at this.

X|X|X|X|X|X|X|X|X|X|X|X|X|

Judah

WORK YOUR BUSINESS LIKE IT IS ALL UP TO YOU....PRAY FOR YOUR BUSINESS LIKE IT IS ALL UP TO GOD
QUOTE BY: UNKNOWN

29 Mar 2008, 5:14 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: iFrames in product description -- how do I make it recognize the selected product?

Probably the reason for no response is that, generally speaking, using iframes is bad practice.

Nevertheless, if you can get your frame page to recognize the URL parameters of the parent/calling page, you might then be able to get it to query the database to identify the correct image name to use.

Otherwise you're going to have to do some fancy custom coding to dynamically supply the product image name to the frame when sending the frame's HTML to the browser.

Or, you could rewrite your frame code to use javascript to rewrite the DOM components or even just change the frame color using alternate CSS styles when the appropriate link/image is clicked.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Mar 2008, 5:51 AM
#5
judah avatar

judah

New Zenner

Join Date:
Nov 2007
Posts:
68
Plugin Contributions:
0

Re: iFrames in product description -- how do I make it recognize the selected product?

Will I need a connection string or some kind of connection for it to recognized which product is being passed

The URL paremeter is saying - =product_info&cPath=3_5&products_id=6

my page is saying - Whatis that?

I need it to look at the database and convert //=product_info&cPath=3_5&products_id=6// into my product.

What is the connection?

Any way I do it I need a separate picture (being the same picture) on the page with my table around it with the photo frame images. And something has to pull it.

I do not want to change the tpl_product_info_display.php or which ever loads my product. because I do not want all of my product to have this option. I also sell just frames. I don't want to put a frame around a frame.

X|X|X|X|X|X|X|X|X|X|X|X|X|

Judah

WORK YOUR BUSINESS LIKE IT IS ALL UP TO YOU....PRAY FOR YOUR BUSINESS LIKE IT IS ALL UP TO GOD
QUOTE BY: UNKNOWN