Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help me to write a code


Guest

Recommended Posts

Posted

Hi,

 

I need to put a title, description and keywords to some of the files eg: privacy.php, contact us.php, FAQ.php.

 

I don't know anything about php, can somebody help me to write those codes?

 

Thanks,

Danny

Posted

Thanks Yesudo,

 

But i already have installed that contribution. And it works well.

 

But i still don't know how to add another files to be included in the header_tags.php

 

It says i have to modify the header_tags file, but I am confused how to add a new file.

 

I have look at the 2 sample files at includes/header_tags.php and includes/languages/english/header_tags.php, but could not understand how to add a new file.

 

Danny

Posted

the contrib readme tells you how to do it.

Your online success is Paramount.

Posted

Probably i am not as good as you.

 

I have read over and over, but it seems i still could not solve it.

 

OK, this is the example what i did,

I want to include privacy.php in the header tags, so this is what i have done:

1. I replace the Old Line in privacy.php

 

<title><?php echo TITLE ?></title>

 

into this New Lines:

 

<?php

// BOF: WebMakers.com Changed: Header Tag Controller v1.0

// Replaced by header_tags.php

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE ?></title>

<?php

}

 

2. And then I go to includes/languages/english/header_tags.php and add this following code:

 

// privacy.php - if left blank in products_description table these values will be used

define('HTTA_PRIVACY_ON','1');

define('HTKA_PRIVACY_ON','0');

define('HTDA_PRIVACY_ON','0');

define('HEAD_TITLE_TAG_PRIVACY','A premier gallery quality asian home decor assessories');

define('HEAD_DESC_TAG_PRIVACY','A celebration of mango wood in its contemporary form: ');

define('HEAD_KEY_TAG_PRIVACY','asian decor, home decor assessories, arts and craft, home decor, contemporary decor, contemporary art, art gallery');

 

 

That's all I did, and it didn't work.

 

Is there anything that i should change? Probably the includes/header_tags.php?

But how? I really don't understand even after reading the readme.

 

PLease help,

Danny

Posted

think you are on the write tracks - but look in the header_tags.php file in the includes dir - you need to make edits there also.

Your online success is Paramount.

Posted

Emmett,

 

I have tried your new improved header tag controller contribution. The file you have included does not work for me to provide the product name in the meta title.

 

I have use STS (simpified Template system) contribution. Is this contribution cause the problem? Because I have use This STS cotribution and a lot others, it is almost impossible for me to start from scrach.

 

Could you do your contribution in a more triditional way? What I mean is just tell us where and how to change file manually. Not just run the file you have provided.

 

Hope you can understand what I am talking about.

 

Thank you for your contribution to make this great contribution better.

Posted

Emmett,

 

I have just read my post and think I should make my request simple like this:

 

In which files and how should I change these files to make the title tag show product name?

 

Thank you and I am waiting for your help.

Posted

The HTC is mainly for pages that change, for a page like privacy.php i would just do something like this.

 

Add this to includes/english.php and for each language.

 

define('HEAD_PRIVACY_TITLE','This is the privacy page....');

 

Then in privacy.php change

 

<title><?php echo TITLE ?></title>

 

To:

 

<title><?php echo HEAD_PRIVACY_TITLE ?></title>

Posted
Emmett,

 

I have just read my post  and think I should make my request simple like this:

 

In which files and how should I change these files to make the title tag show product name?

 

Thank you and I am waiting for your help.

Hello,

 

the file i included with the contrib is a standalone file - not - an edit file.

 

how did you try and use it ?

 

you should upload it to your store then to run it type in your store url then /filename I provided.php and hit return that should be all you need to do.

 

STS/BTS should not effect this file from my understanding as it is free standing.

Your online success is Paramount.

Posted
Emmett,

 

I have just read my post? and think I should make my request simple like this:

 

In which files and how should I change these files to make the title tag show product name?

 

Thank you and I am waiting for your help.

Hello,

 

the file i included with the contrib is a standalone file - not - an edit file.

 

how did you try and use it ?

 

you should upload it to your store then to run it type in your store url then /filename I provided.php and hit return that should be all you need to do.

 

STS/BTS should not effect this file from my understanding as it is free standing.

I have done the install according to your instruction.

 

After run the fill_tags.php, the product name still not showing. Am I did anyting wrong? Please check my site. Thank you.

Posted

have the fields in the db been populated ?

 

have you changed the values relating to product info.php in the htc language file ?

Your online success is Paramount.

Posted

Thank you for your quick response.

 

I must be an idot. I don't know anything about populate in DB. Could you tell me how? Thanks.

Posted

no the file i put with the contrib fill_tags.php should populate the meta tag fields in the database....is this reflected in the db ?

 

this is very difficult for me to work through without being able to access your system.

 

pm me and we can discuss further.

Your online success is Paramount.

Archived

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

×
×
  • Create New...