Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution support] Custom META Tags per ITEM


Randelia

Recommended Posts

I need help :S

 

I installed the contribution and ran into a little problem

 

the shop side is oke and shows up correctly but when i go into the admin and then go to catalog (admin/categories.php?selected_box=catalog) it says:

 

Parse error: syntax error, unexpected T_ELSE in /home/realwear/public_html/shop/admin/categories.php on line 949.

 

when i open up categories.php then these are the lines

 

//rmh M-S_multi-stores begin

} else {

echo TEXT_UNAUTHORIZED_ACCESS;

}

//rmh M-S_multi-stores end

} elseif ($action == 'new_product_preview') {

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

} else {

//rmh M-S_multi-stores begin

// big image amended

// +Randelia Custom_META_Tags_Per_Item

$products_keywords = $HTTP_POST_VARS['products_keywords'];

$products_metadescription = $HTTP_POST_VARS['products_metadescription'];

$products_pagetitle = $HTTP_POST_VARS['products_pagetitle'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, pd.products_keywords, pd.products_metadescription, pd.products_pagetitle, p.products_quantity, p.products_model, p.products_image, p.products_mediumimage, p.products_largeimage, p.products_price, p.products_qty_blocks, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd " . ($admin_allowed_stores[0] == '*' ? " " : " LEFT JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id ") . "where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'". ($admin_allowed_stores[0] == '*' ? " " : " and p2s.stores_id in(" . implode(',' , $admin_allowed_stores) . ")"));

// -Randelia Custom_META_Tags_Per_Item

 

$product = tep_db_fetch_array($product_query);

if (tep_not_null($product) && (tep_is_product_distributor($HTTP_GET_VARS['pID']) == true)) {

$pInfo = new objectInfo($product);

}

$products_image_name = $pInfo->products_image;

// Big Image Start

$products_mediumimage_name = $pInfo->products_mediumimage;

$products_largeimage_name = $pInfo->products_largeimage;

// Big Image End

}

 

$form_action = (isset($HTTP_GET_VARS['pID']) && (tep_is_product_distributor($HTTP_GET_VARS['pID']) == true)) ? 'update_product' : 'insert_product';

echo tep_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . ((isset($HTTP_GET_VARS['pID']) && (tep_is_allowed_product($HTTP_GET_VARS['pID']))) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');

//rmh M-S_multi-stores end

 

NOTE: } else { = line 949

 

 

I have the multi stores & big images contribution installed

 

can anyone help me with this??? I need it much because i only have 1 page in Google :S

 

 

thnx in advance

Link to comment
Share on other sites

  • 1 month later...

:'( Hi There,

 

I just have a few dumb questions regarding this contribution pack.

 

How do I run a SQL script? And which installation method can be easily executed for a starter like myself?

Would you have an installation guidline for me?

 

Thanks alot for answering my queries.

 

 

Have a great night!

 

Aaron

Link to comment
Share on other sites

  • 2 weeks later...

Hello Everyone,

 

I have added 3 contributions to my cart , MVS, xsell and category descriptions. I would like to know how well the Custom META Tags per ITEM works with these contributions. I am mostly concerned with the category descriptions. If anyone is running a similar combination of contributions or has any info regarding this would you mind posting it for me here?

 

Thanks,

 

Lisa

Link to comment
Share on other sites

Well, considering the lack of response I went ahead and installed the contribution. It works just fine but I had modify my installation a little to avoid messing up my installation of MVS.

 

Great contribution but maybe the addition of custom category meta tags could be added someday.

 

Thanks for the contribution.

 

Lisa

Link to comment
Share on other sites

Is anyone supporting the contribution?

 

My custom meta tags are being generated for categories but I can't seem to get the custom tags to show for products. They have the defaults even though I have defined custom tags.

 

Thanks,

 

Lisa

Link to comment
Share on other sites

  • 3 weeks later...

Hi everyone :D ,

 

Love this contribute! Got a question, is there a way to dynamically set the meta tags and page titles using the original product information?

 

Page title = The Product name + Store name

Keywords = Keywords set in general + The product name

Description = The Product's description

 

Instead of setting each product keywords and description individually in the admin.

 

Many thanks for your help, :thumbsup:

 

Kenny

Link to comment
Share on other sites

Hi,

 

I would like to thank you, Randelia for your contribution - Custom MetaTag Per Item!

 

I just have one question.

I keep getting this error message when I click on the category or the manufacturer list:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '69'

 

[TEP STOP]

 

Could anyone please help me as I have to get this site up and running ASAP.

 

Thank You!

Link to comment
Share on other sites

  • 1 month later...

i have this contribution installed, but only the catagory meta tags/titles show up. the items for some reason display the default meta tags/titles... does anyone know why this would be occuring?

Link to comment
Share on other sites

i have this contribution installed, but only the catagory meta tags/titles show up. the items for some reason display the default meta tags/titles... does anyone know why this would be occuring?

 

I have the same problem but still haven't found any help for the problem.

 

Lisa

Link to comment
Share on other sites

  • 2 weeks later...
Lot's of problems but no help! Has anyone installed this script that can help?

 

Am having a similar problem. I got the title tag to show up for each product but it's still showing the default description and default keywords tags in the source code instead of the custom ones set in the admin panel. Can't see where I went wrong in the install and don't know why it's not showing the correct meta tags. Can anyone help with this? Thanks.

Link to comment
Share on other sites

Am having a similar problem. I got the title tag to show up for each product but it's still showing the default description and default keywords tags in the source code instead of the custom ones set in the admin panel. Can't see where I went wrong in the install and don't know why it's not showing the correct meta tags. Can anyone help with this? Thanks.

 

I have noticed on my install that when on the "Configuration - My Store" page, the "Use Search-Engine Safe URLs" is set to true, it does not show the specified meta tags for the product page. When it is set to false it shows them.... Is this the same error that everyone else is getting? Does any one know how to fix this?

Link to comment
Share on other sites

:( I am having a few errors, when I go to edit a product, all of the products information is removed and gone? And the two errors are shown:

Could this be something to do with the database being edited via the script?

 

Thanks

 

 

i got this when i first installed the module (I did the line by line code update)... to solve it i uploaded the files supplied from the admin and the categories.php and then redid my modifications to those files.. i've just got the issue with the "Use Search-Engine Safe URLs" to fix

Edited by Kam Racing
Link to comment
Share on other sites

i got this when i first installed the module (I did the line by line code update)... to solve it i uploaded the files supplied from the admin and the categories.php and then redid my modifications to those files.. i've just got the issue with the "Use Search-Engine Safe URLs" to fix

 

Hello Kim,

 

I turned off "Use Search-Enging Safe URLs" and suddenly my product specific meta tags started working. Well, I have no idea how to fix it but it is nice to know where the problem is.

 

I am wondering how detremental, in search engines, it would be to my site if I leave the setting to false. I do know that not having the specific tags on my products page isn't good either.

 

Thanks for finding the problem area Kim!

 

Any suggestions are welcomed. We would all like to solve this.

 

Lisa

Link to comment
Share on other sites

Hello Kim,

 

I turned off "Use Search-Enging Safe URLs" and suddenly my product specific meta tags started working. Well, I have no idea how to fix it but it is nice to know where the problem is.

 

I am wondering how detremental, in search engines, it would be to my site if I leave the setting to false. I do know that not having the specific tags on my products page isn't good either.

 

Thanks for finding the problem area Kim!

 

Any suggestions are welcomed. We would all like to solve this.

 

Lisa

 

I believe the problem is in how the product id is being picked up for referencing against the database but i'm not sure how to change the code to reflect this

Link to comment
Share on other sites

I installed your contribution, and I like it very much.

The categories, sub-categories and products all work very well. I search the source code and all is fine.

But, when I seach the source code for the index page, my old keywords are still there and I would like to change them, but I do not know how.

 

Also, I do not have any seo installed and I am wondering which one I would be wise to install, there are so many!

I have shared ssl and cannot force cookies and my knowledge of php is very limited.

 

Thanks,

Pete

 

Hi,

 

I have added your contribution and it sounds excellent the way keywords for every page are generated 'on the fly'. I will wait to see the changes in my search engine rankings.

 

One question i do have is, how do i add the verification META name="verify-v1" which google requires? I tried the html verification but this doesn't work for me for some reason. Can this meta name be added to the /functions/general.php file? Can you help with the syntax for this? Thanks.

Link to comment
Share on other sites

  • 4 weeks later...
I believe the problem is in how the product id is being picked up for referencing against the database but i'm not sure how to change the code to reflect this

 

i don't suppose anyone has managed to come up with a fix for this yet?

Link to comment
Share on other sites

If you have search engine safe urls turned on, which I do, then the tags for products will not show. I am not a programmer so I can't figure it out. I'm sorry, but the guy who created this contribution never supports it and I can't seem to entice anyone else to come in and help us out.

 

Lisa

Link to comment
Share on other sites

  • 1 month later...
If you have search engine safe urls turned on, which I do, then the tags for products will not show. I am not a programmer so I can't figure it out. I'm sorry, but the guy who created this contribution never supports it and I can't seem to entice anyone else to come in and help us out.

 

Lisa

 

i've just managed to get it working on my site :) if you add this bit of code to the top of product_info.php it should work on the product pages with search engine safe urls turned on. it will probably break the page if search engine safe urls is turned off though.

 

 

function selfURL() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; } function strleft($s1, $s2) { return substr($s1, 0, strpos('http://www.kam-racing.com/product_info.php/cPath/78/products_id/', $s2)); }

 

$urlstring = selfURL();

$products_id = substr_replace($urlstring, '', 0, -3);

Link to comment
Share on other sites

i've just managed to get it working on my site :) if you add this bit of code to the top of product_info.php it should work on the product pages with search engine safe urls turned on. it will probably break the page if search engine safe urls is turned off though.

function selfURL() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; } function strleft($s1, $s2) { return substr($s1, 0, strpos('http://www.kam-racing.com/product_info.php/cPath/78/products_id/', $s2)); }

 

$urlstring = selfURL();

$products_id = substr_replace($urlstring, '', 0, -3);

 

obviously changing the link to product_info.php to whatever it is on your site

Link to comment
Share on other sites

obviously changing the link to product_info.php to whatever it is on your site
<- ignore, i don't think the link to product_info.php does anything, it was just left over from my previous hashed attempts... to clean it up replace 'http://www.kam-racing.com/product_info.php/cPath/78/products_id/' with $s1 and it should still work
Link to comment
Share on other sites

This is the support link for the 'Custom META Tags per ITEM' contribution.

 

Here's the contribution link:

Custom META Tags per ITEM - Contribution

 

Custom META Tags per Item v1.0

 

This contribution allows you to set which META Tags & page TITLE are displayed on a per-product, per-category, and per-subCategory basis. This is an important step towards SEO! The following custom fields are stored in the database for each product, category, & subcategory:

META Keywords

META Description

TITLE (i.e. <TITLE></TITLE>)

 

This can be used to set default META Tags & page TITLE for your entire OSC store. If a product or category doesn't have an entry for any of the 3 custom fields, it will display the default for those fields.

 

All entries are controlled using the admin console.

 

Multi-language is supported for the product tags.

 

Extra fields are added to the database to hold the custom fields, so this contribution should be very benign in it's interaction with other contributions.

 

I heavily modified & extended Daniel Richards original 'custom meta tags' contribution to include extra fields, multi-language capabilities, and extra functionality.

 

This contribution has been tested with Ultimate SEO URLs.

 

I hope this helps y'all place well in the search engines! :D

 

-Randelia

 

 

I just installed this and it works pretty good, except, in the scrrenshots it shows where you can add keywords along with the product information, but when I add a new product I don't see a place to do that at all...what am I missing...?

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