You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
From looking at the code, it doesn''t seem correct, but some of it seems to be truncated.
This is what you should have, starting from line 327 in ste_exec.pl:
######### ######### Display the site layout. This is done for both regular ######### pages and forms. ######### $element_id = "$page_id"; if ($page_id =~ /^ste_nolay_/) { &display_print($page_id); } else { ######## ######## Mod for metatags, based on: ######## http://forum.kryptronic.com/viewtopic.php?id=4548 ######## $page_title = ""; if ($fd_pg eq "ste_cat") { $dbins_fd_ref = database_quote('category',$fd_ref); $sql_statement = " SELECT category_name,category_desc FROM category WHERE category_id=$dbins_fd_ref "; @title = database_call('category','SELECT',$sql_statement); foreach $row(@title) {($page_title,$page_desc) = @$row;} } elsif ($fd_pg eq "ste_prod") { $dbins_fd_ref = database_quote('product',$fd_ref); $sql_statement = " SELECT product_name,product_desclong,product_keywords FROM product WHERE product_id=$dbins_fd_ref "; @title = database_call('product','SELECT',$sql_statement); foreach $row(@title) {($page_title,$page_desc,$page_keywords) = @$row;} $fd_cat = $q->param('cat'); if ($fd_cat ne "") { $dbins_fd_cat = database_quote('product',$fd_cat); $sql_statement = " SELECT category_name,category_desc FROM category WHERE category_id=$dbins_fd_cat "; @title = database_call('category','SELECT',$sql_statement); foreach $row(@title) {($cat_title,$cat_desc) = @$row;} if ($cat_title ne "") { $page_title = "$cat_title\: $page_title"; } ######### End of if statement. if ($cat_desc ne "") { $page_desc = "$cat_desc\: $page_desc"; } ######### End of if statement. } ######### End of if statement. } else { if ($page_name ne "") { $page_title = "$page_name"; } ######### End of if statement. } ######### End of if statement. if ($page_title ne "") { $html_title_bar_text = "$html_site_name\: $page_title"; $html_title_bar_text =~ s/<[^>]*.//gs; } ######### End of if statement. if ($page_desc ne "") { $html_desc_text = "$page_desc"; $html_desc_text =~ s/<[^>]*.//gs; } ######### End of if statement. if ($page_keywords ne "") { $html_keywords_text = "$page_keywords"; $html_keywords_text =~ s/<[^>]*.//gs; } ######### End of if statement. ######### ######### End mod for meta tags. ######### &display_print('ste_layout'); } ######### End of if statement. &initialize_sub_remove('ste_exec'); } ######### End of if statement. ######### ######### This is a routine where the initialize_sub_remove ######### routine call is moved to within an if statement. If the ######### page calls a subroutine (process routine) we want to run ######### that then come back to ste_exec once processing is ######### completed. If we're just calling an element, we'll do ######### that from within this routine. See code directly above. ######### } ######### End of subroutine.
Hope this helps.
Lisa
Offline
thanks for all your help. I pasted the code as you suggested and that didn't work either.
I guess I'll just keep doing what I've been doing-- create static html pages for each product that I have. It's a pain, but I can't get the dynamic way to work for the life of me.
:-(
lake
Offline
Hmmm. Very odd. The only thing I can think of is that one of your ccp files is corrupted; or you still have an old ccp file that didn't get upgraded during an install.
Lisa
Offline
No static html pages needed.
Offline
I have a slight change I'd like to implement to this as some of the search engine info I've been reading is placing more and more emphasis on the title tag.
I'd like the product name or categories to appear first, then the word "at" then the site name you've entered in admin.
Currently it reads:
ItsAlreadySigned4U.com Sports Memorabilia: Mickey Mantle Autographed Baseball
I'd like it to read:
Mickey Mantle Autographed Baseball at ItsAlreadySigned4U.com Sports Memorabilia
or for a category
Baseballs at ItsAlreadySigned4U.com
No colon but with the word "at".
I believe this will help the search engine situation with the important product words first.
Offline
I got it.
I took this:
$html_title_bar_text = "$html_site_name\: $page_title";
and made it this:
$html_title_bar_text = "$page_title\ At $html_site_name";
Works perfectly to read:
About Us At ItsAlreadySigned4U.com or
Mickey Mantle Baseball At ItsAlreadySigned4U.com
Offline
Brilliant mod, the business!!!
I just added a couple of extra bits so that the item price would also show up in the title bar,
$sql_statement = "
SELECT product_name,product_desclong,product_keywords
FROM product
WHERE product_id=$dbins_fd_ref
";
@title = database_call('product','SELECT',$sql_statement);
foreach $row(@title) {($page_title,$page_desc,$page_keywords) = @$row;}
$sql_statement = "
SELECT product_name,product_regprice,product_desclong,product_keywords
FROM product
WHERE product_id=$dbins_fd_ref
";
@title = database_call('product','SELECT',$sql_statement);
foreach $row(@title) {($page_title,$page_price,$page_desc,$page_keywords) = @$row;}
then towards the bottom
if ($page_title ne "") {
$html_title_bar_text = "$html_site_name\: $page_title ";
$html_title_bar_text =~ s/<[^>]*.//gs;
if ($page_title ne "") {
$html_title_bar_text = "$html_site_name\: $page_title \£$page_price";
$html_title_bar_text =~ s/<[^>]*.//gs;
maybe their is a neater way to implement this mod,
But in a competative business this will let people know we are the cheapest from the outset.
Offline
Would you mind specify the files you edited these entries as well ? There are no results for your mentionned SQL statement anywhere. EXCELLENT ! feature I really must admit. Even, I, didn't thought of that one. There's absolutely "no other cart system on the net" that has this feature. If so, proove me wrong !
Offline
Wow.. has this mod REALLY been here since October!?! And i missed it! OMG...
Has anyone seen any improvements from a SE picking up the URL??? Does the product URL stand a chance of getting indexed?? i.e.
Offline
Scoutch, I made the additions in the st_exec.pl file as Nick showed us. it really is little more than adding a couple of other variables in the mix.
The only real problem is with the £ symbol, which displays on every heading, I need to fiddle about with that a bit
K
Offline
Great mod! I'm getting ready to shift from static pages and couldn't ask for a better tool (will be really useful with ATS seo mod). Made a few changes to suit my seo preferences that differ from the the above version as follows:
Merges Product Name and Product Short Description for the Page Title for product pages, truncated at 60 characters with the intention of beginning all short descriptions with " - ".
Does not merge category/product on product page descriptions, uses only the Product Long Description, still truncated at 150 characters.
Admittedly, I'm pretty ham-handed when it comes to perl so if anyone spots a mistake let me know. Tests out okay though....
$page_title = "";
if ($fd_pg eq "ste_cat") {
$dbins_fd_ref = database_quote('category',$fd_ref);
$sql_statement = "
SELECT category_name,category_desc
FROM category
WHERE category_id=$dbins_fd_ref
";
@title = database_call('category','SELECT',$sql_statement);
foreach $row(@title) {($page_title,$page_desc) = @$row;}
} elsif ($fd_pg eq "ste_prod") {
$dbins_fd_ref = database_quote('product',$fd_ref);
$sql_statement = "
SELECT product_name,product_descshort,product_desclong,product_keywords
FROM product
WHERE product_id=$dbins_fd_ref
";
@title = database_call('product','SELECT',$sql_statement);
foreach $row(@title) {($page_title,$page_title_ext,$page_desc,$page_keywords) = @$row;}
$fd_cat = $q->param('cat');
if ($fd_cat ne "") {
$dbins_fd_cat = database_quote('product',$fd_cat);
$sql_statement = "
SELECT category_name,category_desc
FROM category
WHERE category_id=$dbins_fd_cat
";
@title = database_call('category','SELECT',$sql_statement);
foreach $row(@title) {($cat_title,$cat_desc) = @$row;}
if ($cat_title ne "") {
$page_title = "$page_title";
} ######### End of if statement.
if (($fd_pg eq "ste_cat")&&($cat_desc ne "")) {
$page_desc = "$cat_desc";
} ######### End of if statement.
} ######### End of if statement.
} else {
if ($page_name ne "") {
$page_title = "$page_name";
} ######### End of if statement.
} ######### End of if statement.
if ($page_title ne "") {
$html_title_bar_text = "$page_title$page_title_ext";
$html_title_bar_text =~ s/<[^>]*.//gs;
$html_title_bar_text = vars_truncate($html_title_bar_text,'60');
} ######### End of if statement.
if ($page_desc ne "") {
$html_desc_text = "$page_desc";
$html_desc_text =~ s/<[^>]*.//gs;
$html_desc_text = vars_truncate($html_desc_text,'150');
} ######### End of if statement.
if ($page_keywords ne "") {
$html_keywords_text = "$page_keywords";
$html_keywords_text =~ s/<[^>]*.//gs;
} ######### End of if statement.
Offline
Ed_H,
Could you specify, from your MOD, the "precise" files we have to add these commands please ? !
Thanks.
Sounds like a good MOD too.
Offline
In right before - same as Nick specified in the first post in this thread. Mine is not separate mod - I just tweaked it to suit my preferences and posted it in case someone else might find it useful....
Offline
Excellent then. Is your modifications approved and ready to use though ?
It sounds very interesting.
Offline
That's not what I meant. The way I asked it was : Is it really ready for everybody ? !
It is ? I can't wait to try this then.
Offline
That's not what I meant. The way I asked it was : Is it really ready for everybody ? !
I've already stated that it's just a tweak to the mod posted in this thread, it works, and doesn't break anything, and I just posted it in case it might save someone else a little time & effort. Is there a board of review or something that I've missed?
As with using any code posted in the forum, of the file being edited and give it a whirl.
Offline
Nope, you are in the right section.
Offline
I have added the seo mod listed above. The last one I tried was by ED_H on 3/28/2004. However, after having tried all the mods posted, I still get something like:
in the browser address bar. Am I mistaken that I should get something different -- ie: no ? in the address bar?
Incidently, the meta tags on the resulting pages are all just fine. The tags part seem to be working great.
Offline
The modifications in this thread affect only page titles, meta descriptions, & keywords. The provided by Mark rewrites the URLs to a search engine friendly format and is well worth the investment in my opinion.
Offline
Referencing the really sweet code posted by Webmaster on 10/30/2004, I have tinkered around and we can now have keywords populate the meta tag for category pages. In the past, keywords only populated the meta tag on product description pages.
Okay, here's what we do.
Step 1:
From inside the Site Administrator Control Panel, select "Database Utilities|Manage User Defined Table Columns". In table-name "Category", click Update. Create a new column in the table with the following values -
Column Name: category_metakw
Description: Meta Tag Keywords
Number of Characters: 150
Field Required in Admin: Yes
Admin Display Type: Regular Textarea
Then click the Submit button. Now, when you create a category you will be required to enter keywords. Make sure they are comma delimited.
Step 2:
In ste_exec.pl, make the following changes to Webmaster's code -
$sql_statement = "SELECT category_name,category_desc FROM category WHERE category_id=$dbins_fd_ref"; @title = database_call('category','SELECT',$sql_statement); foreach $row(@title){($page_title,$page_desc) = @$row;}
$sql_statement = "SELECT category_name,category_desc,category_metakw FROM category WHERE category_id=$dbins_fd_ref"; @title = database_call('category','SELECT',$sql_statement); foreach $row(@title){($page_title,$page_desc,$page_kw) = @$row;}
if($page_keywords ne ""){ $html_keywords_text = "$page_keywords"; $html_keywords_text =~ s/<[^>]*.//gs; $html_keywords_text = vars_truncate($html_keywords_text,'150'); }
if($page_keywords ne ""){ $html_keywords_text = "$page_keywords"; $html_keywords_text =~ s/<[^>]*.//gs; $html_keywords_text = vars_truncate($html_keywords_text,'150'); }else{ if($page_kw ne ""){ $html_keywords_text = "$page_kw"; $html_keywords_text =~ s/<[^>]*.//gs; $html_keywords_text = vars_truncate($html_keywords_text,'150'); } }
Have fun!
Roy
Offline
Can someone tell what i can edit if i have the ATS seo mod installed? As it stands, the meta description is the entire decsription which is just plain mad! Can i truncate it using the hack seen in this thread with the ATS seo mod installed?
Offline
I believe that you can accomplish this with Marks (ATS) SEO PRO mod. It is an update to his SEO mod that allows you to specify URL, keywords, meta-tags, description, etc. It is also product specific, so you can change each product individually.
Offline
Thanks, yes i saw that. Just wondered if i could save some money. I'm fine with the normal seo urls, can alter the per-product meta keywords - It's just the meta description for products/categories and title for splash page/ online store homepage that i am in need of. Do you know if i can apply that truncate hack? The search engines might think i'm spamming with a 400 word meta description!
Offline