Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding text boxes with ezpages

Adding text boxes with ezpages

Views: 963

Results 1 to 14 of 14
9 Apr 2013, 1:29 AM
#1
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Adding text boxes with ezpages

Hi,

I used to use this solution on V1.3.9h:

<div id="contact_content"> <?php $page_query = $db->Execute("SELECT pages_html_text FROM ezpages WHERE pages_title='Contact Us Bottom'"); $seo_text = $page_query->fields['pages_html_text']; echo $seo_text; ?> </div>

But it doesn't work on V1.5.1, I get the following error message:
WARNING: An Error occurred, please refresh the page and try again.

Does anyone know if it's possible to do on V1.5.1 and if so how please?

:blink:

9 Apr 2013, 11:46 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding text boxes with ezpages

I used to use this solution on V1.3.9h:
And in what file did you use this?

9 Apr 2013, 9:44 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding text boxes with ezpages

Do you have a define page named "Contact Us Bottom"
With the spaces??

9 Apr 2013, 10:49 PM
#5
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: Adding text boxes with ezpages

Hi Kobra,

No, it's an ezpage.

Following your suggestion I tried closing the gaps but I still got the original error.

This all worked fine as it is on my 1.3.9h version.

:lookaroun

9 Apr 2013, 11:14 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding text boxes with ezpages

This all worked fine as it is on my 1.3.9h version
Compare files & admin settings for this on the 1.5.1 install to your 1.3.9h install

9 Apr 2013, 11:41 PM
#7
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: Adding text boxes with ezpages

Hi Kobra,

I copied all admin settings when doing the rebuild. I've double checked my ezpage settings and ezpages. Anywhere else you think I should look please?

Many thanks for your time.

10 Apr 2013, 12:46 AM
#8
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Adding text boxes with ezpages

try

<div id="contact_content"> <?php $page_query = $db->Execute("SELECT pages_html_text WHERE ezpages.pages_title='Contact Us Bottom'"); $seo_text = $page_query->fields['pages_html_text']; echo $seo_text; ?> </div>
10 Apr 2013, 1:47 AM
#9
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Adding text boxes with ezpages

this should work as well

<?php $sql = "select pages_html_text from " . TABLE_EZPAGES . " where pages_title = 'Contact Us Bottom'"; $seo_text = $db->Execute($sql); echo $seo_text->fields['pages_html_text'] ?>
10 Apr 2013, 3:38 AM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding text boxes with ezpages

Yes, this would take care of the possibility that your new installation uses a db table prefix. A hard-coded table name like you show would not be able to account for any prefix, so you would get a "not found" kind of error when looking if your new site uses a prefix.

10 Apr 2013, 5:29 AM
#11
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Adding text boxes with ezpages

Glenn

I tested on 3 sites, 2 with and 1 without table prefix, works on all with no errors.

v1.5.0 - ezpages
v1.5.1 - sandbox_ezpages
v1.5.1 - zen_ezpages

This is just a suggestion, it works for me.

10 Apr 2013, 2:41 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding text boxes with ezpages

I was perhaps too brief in my comment. I was referring to the OP's hard-coded table name, and saying that what you had suggested (TABLE_EZPAGES) was universally applicable.

11 Apr 2013, 1:07 AM
#13
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Adding text boxes with ezpages

No you weren't too brief, I was too tired. Misread what you wrote.

13 Apr 2013, 7:17 PM
#14
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: Adding text boxes with ezpages

rbarbour:

this should work as well

<?php $sql = "select pages_html_text from " . TABLE_EZPAGES . " where pages_title = 'Contact Us Bottom'"; $seo_text = $db->Execute($sql); echo $seo_text->fields['pages_html_text'] ?>

This solution worked for me, the first solution didn't I got the same error. Thank you so much for your help.
:clap: