X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Display php in tpl (iframe) without second scrollbar? (https://forum.x-cart.com/showthread.php?t=72139)

designguru 05-20-2015 10:23 AM

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.

ITVV 05-20-2015 12:06 PM

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

designguru 05-20-2015 12:38 PM

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.

cflsystems 05-20-2015 12:44 PM

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...

totaltec 05-20-2015 12:58 PM

Re: Display php in tpl (iframe) without second scrollbar?
 
How does X-Cart conflict? JavaScript? CSS?

designguru 05-20-2015 01:13 PM

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?

cflsystems 05-20-2015 01:36 PM

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.

totaltec 05-20-2015 06:06 PM

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}

designguru 05-29-2015 10:43 AM

Re: Display php in tpl (iframe) without second scrollbar?
 
Got it working with html page in php! Tahnks


All times are GMT -8. The time now is 01:59 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.