Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Display php in tpl (iframe) without second scrollbar?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 05-20-2015, 10:23 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Question Display php in tpl (iframe) without second scrollbar?

Hi,

We've implemented some php pages which have different heights and are linked. (question/answer system). We've tried to display it within a static tpl file with an iframe but there was always a second scrollbar appearing that made the content scrollable. We also tried jquery and a ton of other solutions but there was always a conflict with X-Cart.

Anyone successfully implement php pages (small php system within itself) into tpl files / X-Cart? It worked with the wordpress blog but not with these files.

Thanks.
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
  #2  
Old 05-20-2015, 12:06 PM
 
ITVV ITVV is online now
 

X-Wizard
  
Join Date: Nov 2006
Location: UK
Posts: 1,164
 

Default Re: Display php in tpl (iframe) without second scrollbar?

Hi,

Why iframe?

PHP to do the logic (no heights in logic) and smarty to do the display.

I do not see the need for iframe?

Perhaps I have mis-understood the question?

Regards

ITVV
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX
X-Cart Pro 4.6.6 Retired after 6 years of first class service
X-Cart Pro 4.1.7 Retired after 9 years of first class service

Apache: 2.4.25
PHP: 7.4.5
MariaDB: 10.1.44
Arch: x86_64
Reply With Quote
  #3  
Old 05-20-2015, 12:38 PM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Display php in tpl (iframe) without second scrollbar?

Quote:
Originally Posted by ITVV
Hi,

Why iframe?

PHP to do the logic (no heights in logic) and smarty to do the display.

I do not see the need for iframe?

Perhaps I have mis-understood the question?

Regards

ITVV

The problem is that these php files are a small system within themselves and they use different behaviours. Whenever more Q&A posts are added the file page gets longer and a scroll bar appears within the middle content. It usually should work without problem but it seems that X-Cart conflicts with these files.
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote

The following user thanks designguru for this useful post:
ITVV (05-20-2015)
  #4  
Old 05-20-2015, 12:44 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Display php in tpl (iframe) without second scrollbar?

This is Q&A system for XC - https://www.cflsystems.com/product-questions-and-answers-for-x-cart-classic.html . It works as part of XC itself.

I doubt you can make anything work like you say within iframe since the iframe is not dynamic and loads at time of page load. You can make it load different height on page load but you need to be able to read first what the height will be which means you have to access these additional php scripts or info before they make it to the iframe...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 05-20-2015, 12:58 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Display php in tpl (iframe) without second scrollbar?

How does X-Cart conflict? JavaScript? CSS?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #6  
Old 05-20-2015, 01:13 PM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Display php in tpl (iframe) without second scrollbar?

It's a simple forum script itself, not an actual FAQ.
We have a another FAQ.

It only works hardcoded, that's why we tried the iframe route.
There are iframe solutions that dynamically adapt the heights but it didn't work in XC.
XC ouputs syntax / js errors, unexpected token errors.
IMO it should be possible without iframe at all but how to get the informations for page height?
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
  #7  
Old 05-20-2015, 01:36 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Display php in tpl (iframe) without second scrollbar?

Quote:
Originally Posted by designguru
XC ouputs syntax / js errors, unexpected token errors.

You are either not properly adding js to XC templates or loading jquery twice or similar to these.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
totaltec (05-20-2015)
  #8  
Old 05-20-2015, 06:06 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Display php in tpl (iframe) without second scrollbar?

^^ What Steve said.

Check for JQuery being loaded twice (does the forum load jQuery?)

When adding JS to X-Cart try wrapping it with {literal}{/literal}
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #9  
Old 05-29-2015, 10:43 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Display php in tpl (iframe) without second scrollbar?

Got it working with html page in php! Tahnks
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:39 PM.

   

 
X-Cart forums © 2001-2020