Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Define Content 1.x Support


surfalot

Recommended Posts

Did you change the error reporting? Since there is no error, I can't even guess what is wrong. You should back-out any changes you have made until the problem is resolved. (maybe just restore the changed files from your backup.)

 

 

The back up only seems to back up the items in the store or something, because I tried to restore and it looked and acted the same.

 

I tried that one line of code for errors and it didnt show me anything so I took it out.

Link to comment
Share on other sites

  • Replies 269
  • Created
  • Last Reply

Top Posters In This Topic

The back up only seems to back up the items in the store or something, because I tried to restore and it looked and acted the same.

 

I tried that one line of code for errors and it didnt show me anything so I took it out.

Moving forward... The backup in the store only backsup the database. When the contribution says you should backup everything before installing, that means having a complete set of files saved and the data. You should use phpMyAdmin (provided by your host usually, in your host's control panel) to backup the database instead of the store backup.

 

I always have a complete set of files on my local harddrive when doing work on a site. Before installing, I zip-up the files and label the zip with a date so I can always go back if needed.

 

At this point the only thing you can do is follow the install directions in reverse order and remove whatever contributions you have installed last until the problem is resolved.

 

If you periodically check the site as you are removing items, eventually you will hit the problem that is causing that. Then you will know and be able to point to something when you are asking for help.

 

If are new to this, you will find having these backups is invaluable. Sometime the contributions are broken, sometimes you just make a mistake installing it. If you are careful, and only use supported contributions, it can be rewarding.

Link to comment
Share on other sites

Moving forward... The backup in the store only backsup the database. When the contribution says you should backup everything before installing, that means having a complete set of files saved and the data. You should use phpMyAdmin (provided by your host usually, in your host's control panel) to backup the database instead of the store backup.

 

I always have a complete set of files on my local harddrive when doing work on a site. Before installing, I zip-up the files and label the zip with a date so I can always go back if needed.

 

At this point the only thing you can do is follow the install directions in reverse order and remove whatever contributions you have installed last until the problem is resolved.

 

If you periodically check the site as you are removing items, eventually you will hit the problem that is causing that. Then you will know and be able to point to something when you are asking for help.

 

If are new to this, you will find having these backups is invaluable. Sometime the contributions are broken, sometimes you just make a mistake installing it. If you are careful, and only use supported contributions, it can be rewarding.

 

I appreciate your help. I actually didn't realize until I needed it that the backups within the store were not good enough. I will definitely use your method for backups from now on with changes.

 

I have a couple further questions about what might be causing this problem... Do you believe it would be PHP coding or SQL Scripts that I have to run on the server to add Contribs? Would all the back ups of my php files make a difference or replacing them now with the originals if the problem is related to the SQL? And is there any chance this problem is caused by the GZIP / TinyMCE ? Doesn't seem like it would be...

 

Thanks!

Link to comment
Share on other sites

I have a couple further questions about what might be causing this problem... Do you believe it would be PHP coding or SQL Scripts that I have to run on the server to add Contribs? Would all the back ups of my php files make a difference or replacing them now with the originals if the problem is related to the SQL? And is there any chance this problem is caused by the GZIP / TinyMCE ? Doesn't seem like it would be...

 

RE: is there any chance this problem is caused by the GZIP / TinyMCE ? Doesn't seem like it would be...

 

no, not likely

 

RE: Do you believe it would be PHP coding or SQL Scripts that I have to run on the server to add Contribs?

 

9/10 it will be the PHP code.

 

Define Content will be easy to remove. try that first. You don't need to remove the define content specific files, just the PHP additions to the osC standard files. You can follow the install instructions in reverse order for that.

 

Then do the infobox admin contrib. the all products contrib is the least likely one to cause problems.

Link to comment
Share on other sites

I'm having several bugs with the WYSIWYG editor (TinyMCE).

 

It will not recognize the correct directory for images upon saving the content. I'm running OSCommerce in a subdirectory, not the main directory:

 

http://www.westernwalltents.com/catalog/

 

I've specified the correct directories in admin/tinymce_images.js.php as follows:

 

$search_direcories = array( 'images','images/banners','images/default','images/icons','images/tents','admin/images' ); // array of locations to look for images, eg: array( 'images', 'admin/images' );

 

When the WYSIWYG editor saves the content, it appends a catalog/ to the image location... thus the actual HTML gets written:

 

catalog/images/imageforexample.jpg

 

instead of the correct location:

 

/catalog/images/imageforexample.jpg

 

Any ideas?

 

Thank you,

Jason Hackwith

Firewind Productions

http://www.firewindproductions.com/

Link to comment
Share on other sites

Yes, any valid HTML setup can be put into the content. Some PHP (if you enabled it) may not work such as osC modules that are page specific.

 

 

Ive tried this in the catalogue main :

 

<img src="images/mojo/frontpage.gif" width="755" height="229" border="1" align="Center">

<map name="Map">

<area shape="rect" coords="4,-1,181,178" href="http://www.philpearce.com/msdiscreet/product_info.php?cPath=25&products_id=35" target="_self">

</map>

 

No joy. using hotspots

URL

 

Any ideas?

Link to comment
Share on other sites

Ive tried this in the catalogue main :

 

<img src="images/mojo/frontpage.gif" width="755" height="229" border="1" align="Center">

<map name="Map">

<area shape="rect" coords="4,-1,181,178" href="http://www.philpearce.com/msdiscreet/product_info.php?cPath=25&products_id=35" target="_self">

</map>

 

No joy. using hotspots

URL

 

Any ideas?

Basic HTML?

 

<img src="images/mojo/frontpage.gif" width="755" height="229" border="1" align="Center" usemap="Map">

<map name="Map">

<area shape="rect" coords="4,-1,181,178" href="http://www.philpearce.com/msdiscreet/product_info.php?cPath=25&products_id=35" target="_self">

</map>

Link to comment
Share on other sites

catalog/images/imageforexample.jpg

 

instead of the correct location:

 

/catalog/images/imageforexample.jpg

 

Any ideas?

working on this, see the version 1.3 upload. coming soon...

Link to comment
Share on other sites

  • 2 weeks later...

How do you add a link to a new page in the 'Information' block on the home page?

 

For example, I want to put an 'About Us' or similar type of page than can be modified using WYSIWYG, and I've created the page, yet I can't seem to get the code to work in the block file. It either gives me a php error, or just doesn't show it at all.

 

I can't figure out if its supposed to be in the array, and if so, what the correct code is. I think its getting mad because your code has open and close php tags, but they are already being opened and closed for that array....

Link to comment
Share on other sites

How do you add a link to a new page in the 'Information' block on the home page?

to add a link to a new page from your "Information Box", you have to add a new link in this file:

/catalog/includes/boxes/information.php

 

  $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

make it something like this

 

  $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link("about_us.php") . '">About Us</a>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

Link to comment
Share on other sites

This is regaurding using TinyMCE for Product Description. I did just as the code says (pasted below) and I go into the admin->catalog->Categories / Products and click on the product I want to edit so it does open up categories.php but everything looks exactly the same as before, and I even checked the source code and the new code is there. I'm not sure what I'm missing as far as to make the "Use WYSIWYG Editor" to show up? Like in the "Define Content" area?

 

PS the probem I was having before where the site would just go blank when using a submit was fixed by going into php.ini and changing something about using header buffers to on instead of off.

 

----

If you want to change the Product Description entry field, open /catalog/admin/categories.php

---------------------------------------------------------------------------------------------

search for:

 

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

 

 

change to:

 

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '100', '20', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])), 'class="TinyMCE"'); ?></td>

 

 

then again, add the script include lines between the <head></head> tags as before. find this line:

 

<script language="javascript" src="includes/general.js"></script>

 

then add these after:

 

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce_gzip.php"></script>

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/initconfig_pt.js"></script>

Link to comment
Share on other sites

I'm not sure what I'm missing as far as to make the "Use WYSIWYG Editor" to show up? Like in the "Define Content" area?

 

Did you download the "compressor" php script and install that? or did you just upload the TinyMCE javascript?

 

If you are not using the compressor script, you need to change the includes in your <head></head> section to this:

 

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/initconfig_pt.js"></script>

 

where did you come up with this solution, and what was it affecting? (besides the blank page)

PS the problem I was having before where the site would just go blank when using a submit was fixed by going into php.ini and changing something about using header buffers to on instead of off.
Link to comment
Share on other sites

I'm so proud of myself when I figure this stuff all out.. After installing and uninstalling PageEditor twice and neither one working I attacked Define Content and tinyMCE..

 

My specific purpose was to add custom pages with custom content the store merchant could handle updating herself.. mission accomplished, on the first shot and with very little head scratching, I am not a php nooB, but not schooled either.. here is my contribution to the osC world:

 

Add New Pages to INFO Box with Define Content osCommerce MOD w/tinyMCE

 

Open similar layout page (I used privacy.php) from /catalog/ directory and save with new page name:

new_page1.php

 

Update (as needed) the lines that say:

 

ln 15? require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRIVACY);

 

CHANGE TO:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_PAGE1);

 

---------

ln 17? $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRIVACY));

 

CHANGE TO:

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEW_PAGE1));

 

---------

ln 55?

<td class="main"><?php echo TEXT_INFORMATION; ?></td>

 

CHANGE TO:

<td class="main"><?php echo tep_get_defined_content('New Page 1'); ?></td>

 

 

=========

Open coordinating original page (again I used privacy.php) from /catalog/includes/languages/english directory and save with new page name:

new_page1.php

 

Update (as needed) the lines that say:

 

define('NAVBAR_TITLE', 'Privacy Notice');

define('HEADING_TITLE', 'Privacy Notice');

 

 

CHANGE TO:

	define('NAVBAR_TITLE', 'New Page 1');
define('HEADING_TITLE', 'New Page 1');

You can remove the entire

define('TEXT_INFORMATION', '<b>Privacy Guarantee</b>

section, as it is not used now

 

=========

Open /catalog/includes/language/english.php

 

ADD WITHIN -> // information box text in includes/boxes/information.php section

 

define('BOX_INFORMATION_NEW_PAGE1', 'New Page 1');

 

=========

Open /catalog/includes/boxes/information.php

 

ADD WITHIN -> $info_box_contents[] = array('text' =>

 

<a href="' . tep_href_link(FILENAME_NEW_PAGE1) . '">' . BOX_INFORMATION_NEW_PAGE1 . '</a><br>' .

 

Be careful if you add this to the END of the list, the last defined array has different coding to signify its the end of the array

 

=========

Open /catalog/includes/filenames.php

 

ADD BEFORE ?>

 

define('FILENAME_NEW_PAGE1', 'new_page1.php');

 

=========

Upload:

 

/catalog/new_page1.php

/catalog/includes/languages/english/new_page1.php

/catalog/includes/language/english.php

/catalog/includes/boxes/information.php

/catalog/includes/filenames.php

 

=========

In Control Panel, click Define Content

In Manage Areas section click INSERT

Type in New Page 1

Click Insert

 

---------

Under the list of Area Names, Click INSERT, choose New Page 1 and insert your data/information etc.

 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 

Changing existing pages to use with Define Content

 

Open page (I am using shipping.php)

 

FIND:

<td class="main"><?php echo TEXT_INFORMATION; ?></td>

 

REPLACE WITH

<td class="main"><?php echo tep_get_defined_content('NEW CONTENT LABEL HERE'); ?></td>

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Did you download the "compressor" php script and install that? or did you just upload the TinyMCE javascript?

 

If you are not using the compressor script, you need to change the includes in your <head></head> section to this:

 

From what I remember, I installed it. TinyMCE works great with the main page, contact us, etc...from "Define Content" link in admin.

 

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/initconfig_pt.js"></script>

 

where did you come up with this solution, and what was it affecting? (besides the blank page)

 

I had a friend who kind of knows PHP help me figure it out. The reason for it was there was too much stuff clogging up the header or something....so it was crapping out on submit stuff...it wasn't redirecting..I got the emails and the item was added to the cart, but nothing showed up on the screen.

Link to comment
Share on other sites

Hi,

I get this message when trying to open the admin. It is a fresh-unmodified version of os commerce with the define content installed. It says there is no file...but there is. Any ideas?

Thanks.

 

 

Warning: main(includes/classes/navigation_history.php): failed to open stream: No such file or directory in c:\appserv\www\detailsltd\admin\includes\application_top.php on line 126

 

Fatal error: main(): Failed opening required 'includes/classes/navigation_history.php' (include_path='.;c:\php4\pear') in c:\appserv\www\detailsltd\admin\includes\application_top.php on line 126

Link to comment
Share on other sites

That file is part of the /catalog/includes/application_top.php not part of /catalog/admin/includes/application_top.php. this contrib does not modify the admin side application_top.php

 

looks like you copied the catalog side modified files into your admin, If it's a new store it might be easies to start over. otherwise, you need to replace any /catalog/include/ files on your admin side with the originals and be a little more careful copying the files next time. Good thing this was an unmodified store, that could have caused you a headache. >_<

Link to comment
Share on other sites

That file is part of the /catalog/includes/application_top.php not part of /catalog/admin/includes/application_top.php. this contrib does not modify the admin side application_top.php

 

looks like you copied the catalog side modified files into your admin, If it's a new store it might be easies to start over. otherwise, you need to replace any /catalog/include/ files on your admin side with the originals and be a little more careful copying the files next time. Good thing this was an unmodified store, that could have caused you a headache. >_<

 

Thanks. I will start over. If nothing else I'm getting a good tour of all the files and folders!

Len

Link to comment
Share on other sites

That file is part of the /catalog/includes/application_top.php not part of /catalog/admin/includes/application_top.php. this contrib does not modify the admin side application_top.php

 

looks like you copied the catalog side modified files into your admin, If it's a new store it might be easies to start over. otherwise, you need to replace any /catalog/include/ files on your admin side with the originals and be a little more careful copying the files next time. Good thing this was an unmodified store, that could have caused you a headache. >_<

 

 

I copied the files more carfully this time and I can view the admin panel but get this error when looking at the store. The top of the page shows and this it just below:

 

Fatal error: Cannot instantiate non-existent class: box in c:\appserv\www\detailsltd\includes\boxes\configuration.php on line 33

 

Let me know what you think.

Thanks

Link to comment
Share on other sites

I must be missing something as far as using WISYWIG TinyMCE on the product description part of categories.php in admin. Theres a lot of stuff in the define_content.php file that is not in categories.php ..but the install instructions didn't say anything about that..

Link to comment
Share on other sites

Fatal error: Cannot instantiate non-existent class: box in c:\appserv\www\detailsltd\includes\boxes\configuration.php on line 33

Thanks

Hmm, that is strange. did you test the shop before adding the Define Content files?

 

I'm assuming c:\appserv\www\detailsltd\ is the root of your store.

 

c:\appserv\www\detailsltd\includes\boxes\configuration.php should be in:

c:\appserv\www\detailsltd\admin\includes\boxes\configuration.php

 

There is no configuration.php in the \includes\boxes\ folder of store side of the shop as the error indicates.

 

Did you upload all files from the /catalog/ directory of the osCommerce package to the public root folder as is, or change the /admin/ folder back to the root also?

 

you should be good to go if you:

 

1) copy all the files under /catalog/ of the osCommerce package to your site's public root folder c:\appserv\www\detailsltd\

 

2) browse to http://yourdomain.com/install/install.php

 

3) remove the /install/ folder, then secure the /admin/ folder with a password

 

4) test the home page and the /admin/ to ensure it's all working and you don't have any errors or "red bars" at the top of the page.

 

5) upload the files in the 2 folders of the Define Content package /1_files_to_upload/catalog/ & /2_files_to_compare/catalog/ to your root also.

 

6) test the Define Content contrib.

 

7) install the Define Content WYSIWYG if you want that.

 

8) enjoy.

 

The common folder in most contribs is the /catalog/ folder, you need to match that up with where you put that on your store. some upload the /catalog/ folder itself, others just upload the files under it.

Link to comment
Share on other sites

Hello,

 

I am very proud of this contrib, thanks.

 

I have installed it successfully and is trying out something. I found that:

 

1) I cannot see the upcoming products on the main page (it is a module)

2) I installed the Wolfen Featured set, it also cannot be displated (it is a module)

 

I try to copy the code from the module and paste it into the content area, but i got error when I run it

There will be more modules will be installed and display on the first page. here is the page.

 

http://dog-cow.com/shopec

 

On the other hand, I will installed some more contrib. which are in a module mode. I am a dummy in php and trying to understand the languages but it is a high time for me to put things up. At least the core stuff.

 

Please advise what I can do with the modules stuff.

 

again. I am really proud of this contrib and I like to use it for long. In future, may be I can use it for product_info page.

 

Calvin

Link to comment
Share on other sites

1) I cannot see the upcoming products on the main page (it is a module)

2) I installed the Wolfen Featured set, it also cannot be displated (it is a module)

Not all code can be entered into the content. Modules particularly. Modules and contributions need to be installed as they were written. Content entered in the Define Content areas need to be self contained, independent code.

 

On another topic, I'm sure you spent a lot of time adding the Wolfen code, but you might want to look at the Open Featured Sets for future projects. Wolfens has a variety of issues that will inject partial and incomplete tables into your page..

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

 

This is a good contribution, especially for non IT friendly people.

 

On TinyMce, i can't seem to upload picture from my Desktop... Need to upload the manual way n specify the link.... or did i miss out any steps.?

 

Can someone advise?

 

I personally think a change to HTMLarea would be good so as to make it in sync with the WYSIWYG MS2 contribution.

 

cheers

Edited by m_ring2003
Link to comment
Share on other sites

Hello I went to TinyMCE website and checkout the demo.. They have a "browse button" to upload pictures from Desktop... However, when I integrated this, I couldnt find the browse button....

 

Any advices?

 

 

Hello,

 

This is a good contribution, especially for non IT friendly people.

 

On TinyMce, i can't seem to upload picture from my Desktop... Need to upload the manual way n specify the link.... or did i miss out any steps.?

 

Can someone advise?

 

I personally think a change to HTMLarea would be good so as to make it in sync with the WYSIWYG MS2 contribution.

 

cheers

Link to comment
Share on other sites

Hello Folks,

 

Ok, TinyMCE needs a plugin for the image uploader, and we need to pay for the plugin.

 

I tried FCK, and its perfect, just that there is a minor eye-sore error, but it doesnt affect the functionality though... Can the contributor advise on the following?

 

In Admin/define_content.php , the following line actually gives a error ("Error on Page") on the bottom left hand side of IE.... What's wrong?

 

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();FCKload();">

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...