Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cDynamic Meta Tags


clarocque

Recommended Posts

  • Replies 384
  • Created
  • Last Reply

Top Posters In This Topic

Chris,

 

I installed your contrib but in the title bar it keeps listing my item's stock code, is there a way to NOT show the code? It looks really tacky.

 

check out what I mean... www.xxx.com/index.php and pick any item

 

Also, when it is "true" in admin, i get an White error page in MSIE for a split-second then it displays the actual webpage, ever heard of that before?

Firefox works perfect in smile.gif

 

jeff

 

Jeff,

 

I am not sure what you mean when you say True in admin.

 

It does look like you have the path wrong. It is probably an issue in FF too, just loads faster and past it.

 

Check an make sure you have the correct path in Both places(languages and admin).

 

$cache_files_path = '/enter/the/path/to/your/cache/folder/';  

 

I will add this to the upload to help clarify....

 

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

 

If you want to remove the model number from the title go to line 89 in includes/meta_tags.php:

 

Find

if (tep_not_null($product_meta_info['products_model'])) { 
$title.=$product_meta_info['products_name'].' - '.$product_meta_info['products_model'].' ';
}else{
$title.=$product_meta_info['products_name'];
}

 

and replace with

 

//if (tep_not_null($product_meta_info['products_model'])) { 
//$title.=$product_meta_info['products_name'].' - '.$product_meta_info['products_model'].' ';
//}else{
$title.=$product_meta_info['products_name'];
//}

 

I will add some variables for this in next release.

 

Chris

Edited by clarocque

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Chris,

 

I made the change to the meta.php page in catalog/includes and worked perfect :)

 

for the admin, I think this is the line that needs to have my cache folder listed..

 

$cache_files_path = '');

 

my folder is in /public_html/cache/

 

is that how I put it in the quotes?

 

I just want to make sure i do this right

 

 

 

Jeff,

 

I am not sure what you mean when you say True in admin.

 

It does look like you have the path wrong.  It is probably an issue in FF too, just loads faster and past it.

 

Check an make sure you have the correct path in Both places(languages and admin).

 

$cache_files_path = '/enter/the/path/to/your/cache/folder/';  

 

I will add this to the upload to help clarify....

 

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

 

If you want to remove the model number from the title go to line 89 in includes/meta_tags.php:

 

Find

if (tep_not_null($product_meta_info['products_model'])) { 
$title.=$product_meta_info['products_name'].' - '.$product_meta_info['products_model'].' ';
}else{
$title.=$product_meta_info['products_name'];
}

 

and replace with

 

//if (tep_not_null($product_meta_info['products_model'])) { 
//$title.=$product_meta_info['products_name'].' - '.$product_meta_info['products_model'].' ';
//}else{
$title.=$product_meta_info['products_name'];
//}

 

I will add some variables for this in next release.

 

Chris

Link to comment
Share on other sites

Chris,

 

I made the change to the meta.php page in catalog/includes and worked perfect :)

 

for the admin, I think this is the line that needs to have my cache folder listed..

 

$cache_files_path = ''); 

 

my folder is in /public_html/cache/

 

is that how I put it in the quotes?

 

I just want to make sure i do this right

 

When I stripped it I should have not left the ) (will fix with upgrade)

 

your path should read like this:

 

$cache_files_path = '/home/username/public_html/cache/';

 

or something like that - may change based on your server....

 

(if you want to know if you have set it correctly ftp in and see if it is creating cache files or install my ultimate cache manager)

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

now I get these errors on all my pages:

 

<b>Warning</b>: fopen(public_html/cache/_product_info.php_pName=12inch-creature-from-black-lagoon-sse&osCsid=9f2a809fb91808a3fcd577c9bf44045d.meta-cache): failed to open stream: No such file or directory in <b>/home/curtisd/public_html/includes/meta_tags.php</b> on line <b>315</b><br />

 

<br />

<b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>/home/curtisd/public_html/includes/meta_tags.php</b> on line <b>316</b><br />

<br />

<b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/home/curtisd/public_html/includes/meta_tags.php</b> on line <b>317</b><br />

 

I also checked the /cache/ dir and there's no files

 

also, your link to ultimate_cache_manager in your sig took me to microsoft.com

Link to comment
Share on other sites

now I get these errors on all my pages:

 

<b>Warning</b>:  fopen(public_html/cache/_product_info.php_pName=12inch-creature-from-black-lagoon-sse&osCsid=9f2a809fb91808a3fcd577c9bf44045d.meta-cache): failed to open stream: No such file or directory in <b>/home/curtisd/public_html/includes/meta_tags.php</b> on line <b>315</b><br />

 

<br />

<b>Warning</b>:  fwrite(): supplied argument is not a valid stream resource in <b>/home/curtisd/public_html/includes/meta_tags.php</b> on line <b>316</b><br />

<br />

<b>Warning</b>:  fclose(): supplied argument is not a valid stream resource in <b>/home/curtisd/public_html/includes/meta_tags.php</b> on line <b>317</b><br />

 

I also checked the /cache/ dir and there's no files

 

also, your link to ultimate_cache_manager in your sig took me to microsoft.com

 

Look like your path is still

 

you are missing all of the stuff before the public_html like /home/user/....

 

Give me 5 or 10 minustes I will have a new version that will remove the hassle of paths... Seem like many people have a hard time with this....

 

I fixed the link (had to http in it)

Edited by clarocque

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Chris,

 

I just installed your updated file, do I need to edit anything? I refreshed my page and now the source code is NOT showing any errors in FF

 

 

You will have to set the conditions on the includes/languages/english/meta_tags.php page. But no path to set just what you want to use for variables....

 

You can verify you are setup correctly by FTPing ina you should be able to view the cached files.

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

If you want to remove the - in the start of the title on the home page you can change this file (will add to next release)

 

includes/meta_tags.php around line 197 look for:

 

$metatitle.=$title .' - '.STORE_NAME;

 

and replace it with:

 

if (tep_not_null($title))
$metatitle.=$title.' - ';
$metatitle.=STORE_NAME;

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Chris,

 

I did as you suggested in language/english/ dir but I'm not seeing any files in the /cache/ when i ftp to it.. just the .htaccess file..

I have that folder set permissions to 777

 

I marked this line:

$cache_type = 2; // number only, no ' or "

 

do I need to do anything else?

Link to comment
Share on other sites

Chris,

 

I did as you suggested in language/english/ dir but I'm not seeing any files in the /cache/ when i ftp to it.. just the .htaccess file..

I have that folder set permissions to 777

 

I marked this line:

$cache_type = 2; // number only, no ' or "

 

do I need to do anything else?

 

Did you upload all of the the new files?

 

Contact me on AIM

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Did you upload all of the  the new files?

 

Contact me on AIM

 

OK what I found here was the configuration file was off...

 

Please make sure you configuration file has

 

DIR_FS_CATALOG as a full path if not (not sure why not) but if not, you will have to set the cache path manually - should not be a problem for most though.

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Chris,

 

I think something you did with your meta tags files messed up my site. I can no longer use the "buy now" button on product pages..

 

I'm on AIM so hit me up..

 

jeff

 

Look at your SEO URL's more likely that - also might want to do some research on your configuration file (and fix soem of thos errors)... I will try to to IM you...

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Jeff,

 

Seems better now that you disabled Ultimate SEO URL's...

 

go over the install and make sure you did the changes correcty... there are changes for the buy now button

 

You should really look in to some settings... the SID should not stay in the URL, your cookies should not have http ior https or www ...

 

Good Luck

- Gladd it was not my contribution :)

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Hi Claroque,

 

I have 2 stupid questions here to make me understand things better.

 

Q1: Having Header Tag controller installed, is cdynamic tag still working? I think not. I had to remove the Dynamic Product meta tag earlier because it didn't allow me to set HTC correctly.

 

Q2: Where should I write the path for the cache folder? I see the path mentionned above but I don't know where to add it.

 

Thanx!

Link to comment
Share on other sites

Hi Claroque,

 

I have 2 stupid questions here to make me understand things better.

 

Q1: Having Header Tag controller installed, is cdynamic tag still working? I think not. I had to remove the Dynamic Product meta tag earlier because it didn't allow me to set HTC correctly.

 

Q2: Where should I write the path for the cache folder? I see the path mentionned above but I don't know where to add it.

 

Thanx!

 

 

I am nost sure it will work if you have othe meta tag contributions in - you might have to remove them if you want to use this one. You can set some static information but this contributino is mainly to do it all dynamic for you.

 

If you uploaded the latest version just create the cache folder and drop in the htaccess that is in the file and the path should be good to go. The path is already set by default.

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

I got error with adding or rename category.

 

1146 - Table 'dbase.cache' doesn't exist

 

SELECT 1 FROM cache LIMIT 0

 

If I changed from in admin/categories.php

 

# cDynamic Meta Tags
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');

 

to

 

# cDynamic Meta Tags
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $action) );

 

It works fine. Is there gona be any problem with the deleted.

 

Thanks for this great contribution.

Link to comment
Share on other sites

I got error with adding or rename category.

 

1146 - Table 'dbase.cache' doesn't exist

 

SELECT 1 FROM cache LIMIT 0

 

If I changed from in admin/categories.php

 

# cDynamic Meta Tags
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');

 

to

 

# cDynamic Meta Tags
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $action) );

 

It works fine. Is there gona be any problem with the deleted.

 

Thanks for this great contribution.

 

Yes, you need that file to reset the cache when changes are made to a product or category.

 

I will uploaded a new version with fix. The only file you will have to change is admin/includes/reset_meta_cache.php (and put categories back to the way install explains)

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Shouldn't really include the /cache/ directory as part of the install - best to update the install instructions and tell the user exactly where they need to specify the cache directory. Several other contribs use a cache directory, and best to let them point to the one they are using for others...

 

Also, the reset_meta_cache.php file is currently redundant, as you haven't included the SQL script to make this controllable from the Admin side.

 

Also, including configuration values in

catalogincludeslanguagesenglishmeta_tags.php is not a good idea - these should be in the configuration file.

 

Apart from these minor oversights - it looks good - I will see how it performs...

 

I agree with some of what you are saying, however in effort to avoid configuration issues (which seems to be tuff for many people) I provided the file. Like many contributions, it may require some changes if other things are installed.

 

This was a custom job I did and simply ported to here and added the variables for a quick setup...

 

Feel freee to expand - that is why it is open source :rolleyes:

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

hi there!

 

im using the STS system and just tried to install your contribution.

well no errors but no effect at all.

 

guess its because of the STS template system.

 

you agree? or any hints howto solve this problem (as i prefer your idea of metatags over the meta tag controller)

 

greez

 

spleen

Link to comment
Share on other sites

another little thingy...

 

well in the installation it says

 

STEP 3 - ...

Directly AFTER add this:

 

but i had to REPLACE the original <title> tag to get it working.

 

 

 

and the "default" values for index/all in meta_tags.php do not work properly.

if i add an additional desc it adds it twice. for index.php its not working at all.

 

and on product listing i got an additional " - " as prefix at desc.

 

maybe i did something wrong... but doesnt seems so.

 

anyways great contrib!

 

p.s. - deinstalled STS - was crap anyways (for caching etc)

Link to comment
Share on other sites

another little thingy...

 

well in the installation it says

but i had to REPLACE the original <title> tag to get it working.

and the "default" values for index/all in meta_tags.php do not work properly.

if i add an additional desc it adds it twice. for index.php its not working at all.

 

and on product listing i got an additional " - " as prefix at desc.

 

maybe i did something wrong... but doesnt seems so.

 

anyways great contrib!

 

p.s. - deinstalled STS - was crap anyways (for caching etc)

 

 

I have fixed the bugs you mentioned except I was unable to duplicate the xtra - ????

 

Do you have a URL?

 

And I am sorry you are right the install should hve been replace....

 

I will upload the fixes in a few minutes... you can try that -

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

OK uploaded the fixes...

 

 

FYI, INDEX tags should only show on the default index page, if you want them on all index pages let me know.

 

Sorry I cant comment on STS I have never used it, but this works fine with BTS (easier install actually)

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

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...