Zen Cart Logo
Forums / Customization from the Admin / Adding an Image to Define Page Editor

Adding an Image to Define Page Editor

Locked

Views: 4,156

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
7 Sep 2010, 2:55 AM
#1
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Adding an Image to Define Page Editor

I've searched how to do this and my image isn't showing up for some reason.

I ftp uploaded my image as a png at first, wrote out the code for it. That didn't work. So I saved the image as a gif and reuploaded, still didn't work. Tried out the html area editor. Nothing.

I even went into languages/english/filename.php and that just made zencart angry.

The url for the image works. I don't get why it's not working.

7 Sep 2010, 6:28 AM
#2
darkswan avatar

darkswan

New Zenner

Join Date:
Jan 2005
Location:
Mosquito Coast, Texas
Posts:
90
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

A link would be helpful

7 Sep 2010, 12:10 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Adding an Image to Define Page Editor

It's not an image problem.
Your page is breaking due to a system error, presumably something amuck with some PHP change you've made, or maybe you've marked that define page file with wrong permissions and it can't be accessed ... or something.

FAQ on troubleshooting blank or partially-blank pages: https://www.zen-cart.com/tutorials/index.php?article=82

7 Sep 2010, 12:32 PM
#5
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

admin>config>define page status
all my pages are enabled at 1.

i didn't make any customizations to the php files other than renaming the page titles and such. i've been using the About Us Page add-on: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=182

i'll try reuploading the files, see if that makes a difference.

7 Sep 2010, 12:40 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Adding an Image to Define Page Editor

And what do the myDebug log files reveal?

7 Sep 2010, 1:08 PM
#7
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

oh hell. i have 73 debug files.

they all seem to be the same error though.

[06-Sep-2010 14:53:54] PHP Warning: require(includes/languages/english/html_includes/FILENAME_DEFINE_PRICING.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/content/m/e/e/user/html/cb/includes/templates/mytemplate/templates/tpl_pricing_default.php on line 23
[06-Sep-2010 14:53:54] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/english/html_includes/FILENAME_DEFINE_PRICING.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/m/e/e/user/html/cb/includes/templates/mytemplate/templates/tpl_pricing_default.php on line 23

7 Sep 2010, 1:17 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Adding an Image to Define Page Editor

So, you've not defined the constant for FILENAME_DEFINE_PRICING yet.

7 Sep 2010, 1:37 PM
#9
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

i'm not sure what you mean by define the constant. do i just change 'page' to the file name?

require($define_page);
to this>
require($define_pricing);

7 Sep 2010, 1:46 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Adding an Image to Define Page Editor

You said you've been modifying the About Us files, but apparently you've missed updating these:```
// About Us Filename Defines
define('FILENAME_ABOUT_US', 'about_us');
define('FILENAME_DEFINE_ABOUT_US', 'define_about_us');

7 Sep 2010, 2:07 PM
#11
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

i found a mistake i made in the languages/english/extra_definitions folder. i just didn't notice the 'BOX_INFORMATION_PAGE' titles.

modules/pages/pricing/header_php.php:

// include template specific file name defines
  $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_PRICING, 'false');

this looks like where the error is coming from, should i mark it as 'true'?

7 Sep 2010, 2:21 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Adding an Image to Define Page Editor

No. You need to define the value for FILENAME_DEFINE_PRICING to be whatever you named the file to be.

It's just a pattern. It's not complicated.

Here, I'll spell it out for you:
In the About Us addon, there are numerous files which you rename and whose contents you adjust to match whatever new name you're trying to create.
You renamed the /includes/languages/english/html_includes/define_about_us.php file to something else, right?
And in the /includes/extra_configures/about_us_filenames.php you renamed FILENAME_ABOUT_US to FILENAME_PRICING and changed its defined value to 'pricing'.
But you somehow skipped changing FILENAME_DEFINE_ABOUT_US to FILENAME_DEFINE_PRICING, and to actually set its value to 'define_pricing' (or whatever the name of the define-page is that you gave it.

Until you define it, that reference in the header_php.php file to FILENAME_DEFINE_PRICING will just keep saying FILENAME_DEFINE_PRICING, thus making the output never show up, and just generating more error messages.

You have to follow the pattern completely, not selectively.

7 Sep 2010, 2:39 PM
#13
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

oh i see what you mean. i changed it, FTPed it, cleared my cache and my page is still blank though.

7 Sep 2010, 2:47 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: Adding an Image to Define Page Editor

What's the new content of the new myDebug files?

7 Sep 2010, 3:06 PM
#15
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

[07-Sep-2010 07:45:12] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '' (include_path='.:/usr/local/php5/lib/php') in /home/content/m/e/e/meeowws/html/cb/includes/templates/template27496/templates/tpl_pricing_default.php on line 23
7 Sep 2010, 3:25 PM
#16
drbyte avatar

drbyte

Sensei

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

Re: Adding an Image to Define Page Editor

So now you've defined it to a blank value.
We're going in circles here.

7 Sep 2010, 3:42 PM
#17
warsaw avatar

warsaw

New Zenner

Join Date:
Aug 2010
Posts:
13
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

i redownloaded the About Us Add On and compared my files against the originals.

tpl_about_us_default.php:

<h1 id="aboutUsHeading"> <div id="aboutUsMainContent" class="content">

i missed changing the id's. the page works now. thanks for your help.

25 Dec 2010, 3:35 AM
#18
zc_newbie_1 avatar

zc_newbie_1

New Zenner

Join Date:
Nov 2010
Location:
Miami, Florida
Posts:
57
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

I have tried to add image files through the Define Page Editor; specifically a size chart through the html side if it with no success. There is an icon available to click on that allows me to Insert/Modify an image but the only option is an image url. My size chart is on my desktop. There HAS to be another way.

Any help is greatly appreciated.

25 Dec 2010, 7:06 AM
#19
moosesoom avatar

moosesoom

New Zenner

Join Date:
Dec 2008
Location:
Rimini, Italy, Italy
Posts:
67
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

No,
you have to upload your image to your server, then add the link for it in your page by Insert Image icon.

25 Dec 2010, 11:52 AM
#20
zc_newbie_1 avatar

zc_newbie_1

New Zenner

Join Date:
Nov 2010
Location:
Miami, Florida
Posts:
57
Plugin Contributions:
0

Re: Adding an Image to Define Page Editor

Oh. So does it matter which folder I place the image into?