Jump to content

Archived

This topic is now archived and is closed to further replies.

jhilgeman

Easily Add New Pages

Recommended Posts

But where in what line in includes/application_top.php

do you add // New page about_us.php

 

define('FILENAME_ABOUT_US', 'about_us.php');


In a sacred manner I live, in heaven I gaze, in a sacred manner I live my horses are many.

Share this post


Link to post
Share on other sites

there is filenames.php in that its to be done.

 

Satish


Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Share this post


Link to post
Share on other sites

But where or in what line shall I add this in includes/application_top.php

 

// New page about_us.php

 

define('FILENAME_ABOUT_US', 'about_us.php');


In a sacred manner I live, in heaven I gaze, in a sacred manner I live my horses are many.

Share this post


Link to post
Share on other sites

Hey Burt!

 

This is a great tutorial, but I'm wondering where I'm putting this last snippet of code in the application_top.php file?

 

Thanks!

 

 

Download, and open up application_top.php and add the following:

// New page about_us.php

define('FILENAME_ABOUT_US', 'about_us.php');

Save and upload includes/application_top.php

Now go Admin > Tools > Define Languages > about_us.php

Done. It sounds complicated but once you get the hang of it, it takes no longer than 2 minutes. It maintains the proper Osc structure.

Share this post


Link to post
Share on other sites

Burt's not around anymore, which is too bad. But in answer to your question, that change goes in the includes/filenames.php file. It used to go in application_top but that was changed with a version update.

 

Jack

Share this post


Link to post
Share on other sites
i am still kinda lost. I am trying to ass a new page that shows what clothing companies i carry. I use sts, so i changed the template thing into my table setup, and i did that filename_mens.php in it thing. I added a new define in filenames.php, i uploaded application_top, and i uploaded english/mens.php (but i am kinda lost on tht one). For the english/newfilename.php file is that the file you add your info on? If so i did that too... After all that i get this error...

Warning: main(includes/languages/english/Mens.php) [function.main]: failed to open stream: No such file or directory in /home/bleubayc/public_html/osc/mens.php on line 15

 

Warning: main(includes/languages/english/Mens.php) [function.main]: failed to open stream: No such file or directory in /home/bleubayc/public_html/osc/mens.php on line 15

 

Warning: main(includes/languages/english/Mens.php) [function.main]: failed to open stream: No such file or directory in /home/bleubayc/public_html/osc/mens.php on line 15

 

Fatal error: main() [function.require]: Failed opening required 'includes/languages/english/Mens.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bleubayc/public_html/osc/mens.php on line 15

 

it says that there is no file, but there is... it is weirddddd :-/ this is confusing me ahhh... please help

The "Add New Pages Using STS" contribution located in the STSv4 Power Pack site could really help you out with this. (see STSv4 Power Pack link in my signature below)


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

hello everyone

I'm really new in oscommerce and php isn't my favorite language, sorry but i had to say that at the beginning. I'm writing in this topic because I thought it's the most similar to the problem I have. I was wandering how could I add a new "box" in the column_right.php, becouse right now it is showing the products in the store. The idea is that the main page is somekind of invitation page. Then by choosing a product from the column_left it directs customer to the products. And here is another thing I would like to change. In my store there are general product categories ,when You click on them there is a drop down menu where you can choose a product. I would like something like description of this general product categories in the right instead of product listing, so when you click on the general product the page is going to reload and there's going to product listing in the drop down menu on the left and description of the group of products in the right. Could anyone give me any ideas how to solve it, and if it's possible in really easy way. I know other programming languages I just missed php:)

Thank You in advance

 

hgrzesiek

P.S. I hope i wrote it clear for everyone

Share this post


Link to post
Share on other sites
Your way is good, but better (IMO):

Download the following files:

catalog/conditions.php

catalog/includes/languages/english/conditions.php

Save them (on your Hard Drive as):

catalog/template.php

catalog/includes/languages/english/template.php

When you want a new page:

Open catalog/template.php (on your HD) and change the following:

 

Useing berts example, which is very good for normal pages, i am struggling to include within the text fields on the new page to put my ressellers link into it, the code just does'nt seem to be recgonised?

 

is there a way to include external links without creating a page outside of OSC?

Share this post


Link to post
Share on other sites
hello everyone

I'm really new in oscommerce and php isn't my favorite language, sorry but i had to say that at the beginning. I'm writing in this topic because I thought it's the most similar to the problem I have. I was wandering how could I add a new "box" in the column_right.php,

This may help.

 

Jack

Share this post


Link to post
Share on other sites
Useing berts example, which is very good for normal pages, i am struggling to include within the text fields on the new page to put my ressellers link into it, the code just does'nt seem to be recgonised?

 

is there a way to include external links without creating a page outside of OSC?

What is the code you are using for the link?

 

Jack

Share this post


Link to post
Share on other sites

<a href="java script: void(0);" onClick="var win = window.open('https://www.enta.net/emb/?resellerID=****&reseller=*************************************=1', 'BuyNow', 'top='+((screen.height-600)/2)+',left='+((screen.width-800)/2)+',width=800,height=600,toolbars=no,menubar=no,status=yes,resizable=yes,scroll
bars=yes');return false;">Order Now</a>

 

Thats wot i'm trying to inculde. Theres other code with it, it fails at the url at "//" its sees it as a note(or wotever they are called).

 

Please help!!!!

Share this post


Link to post
Share on other sites

At the beginning of this thread someone mentioned a add-on for dynamically created pages - does anyone know the name of it? I am looking really for an add-on that will allow pages to be created from the controlpanel.

Share this post


Link to post
Share on other sites

There are a number of them. The two that come to mind are pagemanger and pages unlimited (or similar names).

 

Jack

Share this post


Link to post
Share on other sites

Burt - Added your instructions to a T and got a '500 Internal Server Error' - any ideas? Thanks.

Share this post


Link to post
Share on other sites

Check the permissions on the new files. Make sure they are the same as the ones in the same directory.

 

Jack

Share this post


Link to post
Share on other sites
Check the permissions on the new files. Make sure they are the same as the ones in the same directory.

 

Jack

 

Thanks. One problem solved, another created :lol: -

 

 

Fatal error: Cannot redeclare class tablebox:messagestack in /home/jaide/public_html/includes/classes/message_stack.php on line 20

Share this post


Link to post
Share on other sites

That error shouldn't have occurred by just addig a new page unless you used some page that has special coding in it as a reference. Is the error only happening on your new page? If so, then try replacing the new page files with copies of the privacy files and see what happens.

 

Jack

Share this post


Link to post
Share on other sites
That error shouldn't have occurred by just addig a new page unless you used some page that has special coding in it as a reference. Is the error only happening on your new page? If so, then try replacing the new page files with copies of the privacy files and see what happens.

 

Jack

 

Yes, only on the new page. I copied the privacy page and replaced the FILENAMEs exactly as stated

Share this post


Link to post
Share on other sites

My error has been fixed. I was uploading the wrong newpage.php in the languages>English section

Share this post


Link to post
Share on other sites

Hi guys i did everything that you guys told me change it to template then rename etc etc

but at moment my link "buyer guide is still not coming up on website even though i have done everything that was told in the post topics please can someone help

Share this post


Link to post
Share on other sites

I tried to add simple page testpage.php and now i have problems

 

http://www.wonderjewelers.com/testpage.php

 

What does this mean

 

Warning: main(templates/content/WJ1/.tpl.php) [function.main]: failed to open stream: No such file or directory in /home/.doobie/kusuma1/wonderjewelers.com/templates/WJ1/main_page.tpl.php on line 72

 

I was told my site was highly customized old template and that is why I am having problems

Share this post


Link to post
Share on other sites

×