Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Hello! I have many linked products in a shop. I've noticed what HTC alvays displays in a page title "original" category of product.

For example:

We sold batterys for laptops, battery NB-802 suits for 5 models of notebooks. Models of notebooks is a categories:

Asus A3 (this is category 1)

Asus A3500 (this is category 2)

Asus A3500L (cat. 3)

Asus A4 (cat.4)

Asus A4500 (and category 5)

 

We create poduct "NB-802" in "Asus A3" category and link (not copy!) this product to other categories.

Now if we try to look in "Asus A4500" category (or any other from mentioned above) - HTC shows to us in a page title "Asus A3 NB-802".

 

Is it possible to workaround this problem?

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Yes, you can. But the changes in Install_Catalog.txt will still need to be made.

 

Jack

 

 

Hi Jack

 

I reloaded the contribution after I figured out what I was doing wrong with the zip files and I got it working straight away.

I just want to thank you for your help and the great contribution you have allowed us access to.

 

THANK YOU :thumbsup:

Link to comment
Share on other sites

hi all

 

i just installed this contrib and when i'm trying to go in the catalog section in the admin panel i get this error,

 

Parse error: parse error, unexpected T_CASE in /home/content/s/h/v/shvemel/html/admin/categories.php on line 331

 

here is the lines from line 317 till 350 of that file,

 

			}

		tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')");
		$products_id = $dup_products_id;
	  }

	  if (USE_CACHE == 'true') {
		tep_reset_cache_block('categories');
		tep_reset_cache_block('also_purchased');
	  }
	}

	tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id));
	break;
  case 'new_product_preview':
// copy image only if modified
	$products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);
	if ($products_image->parse() && $products_image->save()) {
	  $products_image_name = $products_image->filename;
	} else {
	  $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
	}
	break;
}
 }

// check if the catalog image directory exists
 if (is_dir(DIR_FS_CATALOG_IMAGES)) {
if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
 } else {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
 }
?>

 

i did not have this before,

 

can anyone please help me with this?

 

thank you.

Link to comment
Share on other sites

The title of the product can be set in the product edit page.

 

Jack

 

Tnx for reply, Jack. Yes, i know. But i'm talking about DIFFERENT page titles for same product in different catgories.

Link to comment
Share on other sites

Hi I've installed the header tags controller v2.6.2

I'm having a problem changing the CHMODs and am waiting for my host to get back to me.

When I try to open my catalogue in admin I get this error message

 

Parse error: syntax error, unexpected T_CASE in /home/sites/petbling.co.uk/public_html/oscom/admin/categories.php on line 995

 

I'm not a coder and I cant see what I have done wrong any ideas? would it help if I post the relevant part of the php file here?

 

Thanks

Eva

Link to comment
Share on other sites

hi all

 

i just installed this contrib and when i'm trying to go in the catalog section in the admin panel i get this error,

here is the lines from line 317 till 350 of that file,

 

 

i did not have this before,

 

can anyone please help me with this?

It means there was a mistake made with the changes to the categories.php file. There is one included in the contribution. You can use that to compare against, or even use if there are no other changes to the file.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Tnx for reply, Jack. Yes, i know. But i'm talking about DIFFERENT page titles for same product in different catgories.
It's a copy of the product, which means everything in that products database entry is just called when used in the other categories. I suppose you could put in code to check if the product is a real one or a copy and change the code from there, but that is beyond the scope of Header Tags.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi I've installed the header tags controller v2.6.2

I'm having a problem changing the CHMODs and am waiting for my host to get back to me.

When I try to open my catalogue in admin I get this error message

 

Parse error: syntax error, unexpected T_CASE in /home/sites/petbling.co.uk/public_html/oscom/admin/categories.php on line 995

 

I'm not a coder and I cant see what I have done wrong any ideas? would it help if I post the relevant part of the php file here?

 

Thanks

Eva

See the previous response. You can download the free Winmerge compare program to compare the two categories.php files to find your mistake.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

See the previous response. You can download the free Winmerge compare program to compare the two categories.php files to find your mistake.

 

Jack

 

 

Nope that line is exactly the same?

could it be that I haven't managed to run the header tags controller yet because my permissions aren't set yet?

Link to comment
Share on other sites

No, it means there is a mistake in the code in the file. It doesn't have to be on the same line as reported but it won't be after that line. Try replacing the entire file with the one in the archive to verify that it does work.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, it means there is a mistake in the code in the file. It doesn't have to be on the same line as reported but it won't be after that line. Try replacing the entire file with the one in the archive to verify that it does work.

 

Jack

 

Yep the old one works so I'll just start again!

 

thanks

Link to comment
Share on other sites

thanx Jack_mcs but i need it to be coded as my store is fully populated with products it would take days to do this by editing product pages.

 

if you find away please post.

 

cheers...

Link to comment
Share on other sites

You could edit the fill tag code to append the price. Although using special characters in the title is generally not recommended. Plus, it changes the keyword for the page which is probably not searched for much. There is also the problem of what happens when a price changes. Let's say you have a product with the title of "Best gadget $2" and you are ranked number one for it. It the price changes to $2.10, you will lose your ranking, probably for only a few weeks, but that is generally not something that should be messed with.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi All!

 

Hopefully nobody will kick my ass for silly questions...

 

Over the fresh Installation of Osc2_2ms2_051113_with_CMG_fix (overrides Global variables problem) just installed HeaderTags_V_2.6.2+typo. Again had to change all $HTTP_GET_VARS to $_Get just in order to get present contribution woking somehow ;-)

 

Now it looks working and I can see contribution IS changing ../includes/langv../english/header_tags.php, but if I save specific page on my HDD I see:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!-- saved from url=(0045)http://www.kitex.lv/catalog/index.php?cPath=3 -->

<HTML lang=en dir=ltr><HEAD><TITLE>Varis Toys WEB shop</TITLE>

<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK

href="osCommerce_files/stylesheet.css" type=text/css rel=stylesheet>

<META content="MSHTML 6.00.2800.1589" name=GENERATOR></HEAD>

<BODY bottomMargin=0 leftMargin=0 topMargin=0 rightMargin=0 marginheight="0"

marginwidth="0"><!-- header //-->

 

 

 

isn't it supposed to be like:

 

<meta name="Description" content="' .

<meta name="Keywords" content="' . $

<meta name="robots" content="

<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '" />'."\n";

 

Or I don't understand something?

 

Thks to any who spent a time reading my issue...

Link to comment
Share on other sites

What you displayed is incorrect but if I go to http://www.kitex.lv/catalog/, it doesn't show what you displayed above, so I'm not sure what you are looking at.

 

To test it, make a change for the title in the index section of admin->Header Tags->Text Control and see if the change can be seen on the home page of your site.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack

 

Seem to be suddenly getting new errors on Header Tags.

 

When adding a new page, then hitting the update button, it seems to see the update button on the next table down, thus deleting a selected page too aswell as adding the new page?

 

Also on the edit pages screen, after updating some pages there, some fields on pages are lost?

For example - Viewing source on store index, it shows the info I added, but yet in tags it shows blank.

 

Any ideas? It had been fine for ages since install. I first thought it was the server, but that hasnt changed either.

 

Cheers

Modulate

Link to comment
Share on other sites

Jack

 

Seem to be suddenly getting new errors on Header Tags.

 

When adding a new page, then hitting the update button, it seems to see the update button on the next table down, thus deleting a selected page too aswell as adding the new page?

 

Also on the edit pages screen, after updating some pages there, some fields on pages are lost?

For example - Viewing source on store index, it shows the info I added, but yet in tags it shows blank.

 

Any ideas? It had been fine for ages since install. I first thought it was the server, but that hasnt changed either.

 

Cheers

Modulate

No, I can't imagine what would change that would cause that. I suggest replacing the header tags files in admin to see if that fixes it. You can safely replace those as long as they are from the same version.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Just did some changes - see pic added. So far can't see any changes on html generated... or I got a tomatos in my eyes?

 

PrtScr.gif

What is it that you are trying to show?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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