Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php includes versus database for pages


dhooper

Recommended Posts

I'm moving back to OSC from having used Wordpress for the past year.  I need to keep my server resource usage to a minimal.  I'm creating pages and am curious to know which uses fewer resources... using the database to create pages (like in products and categories) or the php includes files (like for index and contact us)? 

I've considered creating completely static html pages, but I still want to be able to use the contact us and search features.  The information that I'd be putting in the database or the includes pages is mostly the meta information like TITLE and DESCRIPTION.

Your input is greatly appreciated!

Diana

Link to comment
Share on other sites

Maybe I should explain myself a little further... in the template top, there is this line:

<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title> 

Does this information get pulled from the database or the includes file that has

define('HEADING_TITLE', 'Contact Us'); 

I want to add additional meta tag information that changes per page, so it looks something like this:

 

<meta itemprop="description" content="Quality therapeutic grade essential oils for aromatherapy and massage at wholesale prices. Get your Introduction to Essential Oil eGuide">
<meta name="description" content="Quality therapeutic grade essential oils for aromatherapy and massage at wholesale prices. Get your Introduction to Essential Oil eGuide">
<meta property="og:description" content="Quality therapeutic grade essential oils for aromatherapy and massage at wholesale prices. Get your Introduction to Essential Oil eGuide" />
<meta name="twitter:description" content="Quality therapeutic grade essential oils for aromatherapy and massage at wholesale prices. Get your Introduction to Essential Oil eGuide" />
<meta property="og:url" content="http://essentialsoflife.net/Test/test-again.html" />
<meta itemprop="url" content="http://essentialsoflife.net/Test/test-again.html" /> 
<meta name="twitter:image" content="http://cdn.essentialsoflife.net/img/footer-meta.jpg" />
<meta property="og:image" content="http://cdn.essentialsoflife.net/img/footer-meta.jpg" />
<meta itemprop="image" content="http://cdn.essentialsoflife.net/img/footer-meta.jpg"> 
<meta name="keywords" content="quality therapeutic grade essential oils" />
<meta itemprop="keywords" content="quality therapeutic grade essential oils" />
<meta property="article:tag" content="quality therapeutic grade essential oils" />
<meta property="og:title" content="Quality Therapeutic Grade Essential Oils" />
<meta name="twitter:title" content="Quality Therapeutic Grade Essential Oils" />
<meta property="article:section" content="Quality Therapeutic Grade Essential Oils" />
<title>Quality Therapeutic Grade Essential Oils</title>

What is the best way to go about doing this?

Diana

Link to comment
Share on other sites

All of the meta tags you are wanting to include will be included via header_tags. I'm assuming (hoping) you are using the latest 2.3.4BS version of osC, which should include those header_tag modules. 

There are some old page cache modules but it opens up all sorts of issues. osC runs pretty efficiently out of the gate these days so it shouldn't bog your server down. That is unless you have a super high traffic site and/or are using shared hosting, which tends to be slower anyway.

Matt

Link to comment
Share on other sites

To amplify that a bit: $oscTemplate->getTitle() echos whatever was entered into $oscTemplate->setTitle(). You can feed that from the database, from a variable, or from a constant -- whatever you want. Modern osCommerce is pretty flexible.

One thing you should never do is mix in static HTML pages. A customer going to one of those pages could lose their session, including cart contents, etc. This makes for unhappy customers. Keep everything in the osC framework and you'll be fine.

Regards

Jim

 

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...