• Hello all!

    I’m attempting to use iframe to direct my customers to my checkout page for my services. Since I have two different webpages, I wanted to make it a smooth transition and just have it all on one website. When I test it out and click on a membership service( at the bottom of the webpage), its directed to the homepage of my other website instead of the checkout page which is included in the iframe. I confirmed that it works correctly using a proxy website like kproxy.com but it doesn’t work without it.

    Any suggestions? I’m not exactly sure if this is a wordpress issue or not.

    website: http://www.mcaproservice.com/memberships

    Membership links are at the bottom of the page. Thanks in advance!

    https://wordpress.org/plugins/iframe/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you using the iFrame plugin? I cannot see that plugin active on your website.

    Thread Starter fwashington

    (@fwashington)

    Yes I’m using the iFrame plugin and its currently active. I just recently discovered that the webpage works perfectly fine using firefox but theres still trouble when attempting to use Internet Explorer and Safari.

    Thread Starter fwashington

    (@fwashington)

    Hi Andrew,

    Any suggestions that I should try to resolve this issue since you stated that it was a plugin error?

    fwashington

    In the iframe URLs that are being passed are something like

    https://tvcmatrix.com/secure/cart/addItem.aspx?qty=1&itID=9135&PromoID=83&uid=freddiewashington

    while what needs to be in there is something like

    https://tvcmatrix.com/secure/cart/addItem.aspx?qty=1&itID=9135&PromoID=83&uid=freddiewashington

    Seems the values iframe plugin is getting is after they are replaced.

    I was able to get it to work by modifying some code in the plugin(as there were no filters I could use). I changed the code block below:

    foreach( $atts as $attr => $value ) {
    		if ( $attr != 'same_height_as' ) { // remove some attributes
    			if ( $value != '' ) { // adding all attributes
    				$html .= ' ' . $attr . '="' . $value . '"';
    			} else { // adding empty attributes
    				$html .= ' ' . $attr;
    			}
    		}
    	}

    To

    foreach( $atts as $attr => $value ) {
    		if ( $attr != 'same_height_as' ) { // remove some attributes
    			if($attr="src"){
    				$value = str_replace(array('&','&'),'&',$value);
    			}
    			if ( $value != '' ) { // adding all attributes
    				$html .= ' ' . $attr . '="' . $value . '"';
    			} else { // adding empty attributes
    				$html .= ' ' . $attr;
    			}
    		}
    	}

    Which replaced the URL components back to what they were before.

    You should ask this question in the plugin’s support as well, and can even give this solution to them so that they can fix the issue.

    fwashington

    Please use this code instead, I was unable to use some special characters in the reply

    http://pastebin.com/MhcmER3j

    Thread Starter fwashington

    (@fwashington)

    Hey thank you very much for your help Gagan. I didn’t know where to direct my question. Excuse my ignorance since this is the first website that Ive created so my knowledge is pretty limited but where do I place the code that you provided me?

    [ Stop bumping your topics, those get deleted. ]

    Plugin Author webvitaly

    (@webvitaly)

    @ Gagan Deep Singh ( @gagan0123 ) :

    Thank you very much for contributing the code.

    Can you provide additional details why you added ampersand replacement code?

    Because with your code or without it params are added via url successfully.

    Your code with underscores added for avoiding the strip:

    if ( $attr == 'src' ) {
    	$value = str_replace(array('&_#038;','&_amp;'),'&',$value);
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Issue with iframe? Page doesn't direct to correct webpage’ is closed to new replies.