Jump to content
Jack_mcs

Header Tags SEO

Recommended Posts

On 1/24/2020 at 11:31 PM, Jack_mcs said:

A new version has been uploaded with these changes:

  • Corrected the code to add individual missing pages when the automatic page option is off.
  • Corrected the add missing pages code since it mangled the includes/header_tags.php file.
  • Corrected the code that adds categories and manufacturers to the titles so it doesn't apply when the parents setting is set to standard.
  • Corrected the duplicate product code in admin/categories.php.
  • Corrected the database installer so it did not delete previous tables.
  • Removed a call to language files no longer needed.

Is it compatible with Phoenix- 1.0.5.0?

Share this post


Link to post
Share on other sites
9 hours ago, radhavallabh said:

Is it compatible with Phoenix- 1.0.5.0?

Yes, it should. It was test in 1.0.4.4 and nothing was changed in the later versions of Phoenix that would cause problems.

Share this post


Link to post
Share on other sites

Hi, everthing worked great in phoenix 1.0.5.0  but in phoenix 1.0.5.2. the update buttom on the bottom in the Fill Tags Menu is gone.

fillinmenu.jpg

Share this post


Link to post
Share on other sites

@Rollo44 I don't have that version setup here so I can't test it but the following may work. In admin/header_tags_fill_tags.php, find

              <td align="center"><?php echo (tep_image_submit('button_update.gif', IMAGE_UPDATE) ); ?></td>

and replace it with

              <td align="center"><?php echo tep_draw_bootstrap_button(IMAGE_UPDATE, 'fas fa-save', null, 'primary', null, 'btn-success btn-block btn-lg'); ?></td>

 

Share this post


Link to post
Share on other sites

Thanks, that works, the buttom is back. Unfortunatly something else doesn't work. After pressing the update bottom its says that tags have been filled. But when you go to the category or product page the SEO fields are empty. But maybe its just my store.

Share this post


Link to post
Share on other sites

No, it's probably the code since the button has not been tested. You could try running the included cron file since that files empty tags and doesn't need a button. I don't recall if it will run manually but you could quickly setup a cron job for it. As for the button, I may work on that at some point. The problem is that every other version of Phoenix breaks code that has always worked and, as a developer, it just takes too much time to keep up with the changes.

Share this post


Link to post
Share on other sites

Jack using Pheonix 1.0.5.4 and trying to install. FIND (around line 787):

<?php
  } elseif ($action == 'new_product_preview') {
    $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id, pd.products_seo_title, p.products_gtin, pd.products_seo_description, pd.products_seo_keywords from products p, products_description pd where p.products_id = pd.products_id and p.products_id = '" . (int)$_GET['pID'] . "'");

REPLACE WITH:
 
<?php
  } elseif ($action == 'new_product_preview') {
    /*** Begin Header Tags SEO ***/ 
    $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id, pd.products_seo_title, p.products_gtin, pd.products_seo_description, pd.products_seo_keywords, " . GetHTSFieldListWithIDs() . " from products p, products_description pd where p.products_id = pd.products_id and p.products_id = '" . (int)$_GET['pID'] . "'");
    /*** End Header Tags SEO ***/ 

problem is  that I already replaced that area with Quantity Price breaks

<?php
  } elseif ($action == 'new_product_preview') {
    // BOF QUANTITY Price Breaks
    $product_query = tep_db_query("select p.*, pd.*, ptdc.discount_categories_id, dc.discount_categories_name from products p left join products_to_discount_categories ptdc on p.products_id = ptdc.products_id left join discount_categories dc using(discount_categories_id), products_description pd where p.products_id = pd.products_id and p.products_id = '" . (int)$_GET['pID'] . "'");

How can I combine them to work.

Thanks

 

 

 


"Do what I'm thinking Not what I said." https:windowanddoorparts.us

Share this post


Link to post
Share on other sites

@dewarsco2You can skip that step. Its purpose is to load in the new fields added by this addon. But in the newer versions of Phoenix, the code loads in all of the fields already so doing this step is not needed.

Share this post


Link to post
Share on other sites

Hi Jack,

I try to install unsuccessfully.
I restore files but site show HTS_TEXT_VIEWING and social icons in catalog and HTS_BOX_HEADING_HEADER_TAGS_SEO menu.
Where define name? or How I can full remove

Share this post


Link to post
Share on other sites

Those defines are in the language files. To fully remove, you have to reverse the steps you made when you installed it or restore the files from backup.

Share this post


Link to post
Share on other sites
909/5000
 
 
 
Hi Jack,

I have installed Header Tags SEO V 3.3.7 (Catalog part) in OSCOM CE Phoenix v1.0.4.0.
I used the instal_category.txt file for the 5 files i.e. template_top.php, application_top.php, product_listing.php, category_tree.php and advanced_search_result.php.

after installation I saw no more category names in the categories box. The link to the sub category / product list still works.
This was caused by the (new) empty fields in the category_description table. (the category_description field and the new ...._ htc _.... fields are still empty.) So far so good, I would say.

But what I still miss is the title "Replace me in Page Control under index.php - oscommerce-solution.com"
can you tell me how important this is, or will this be fine after installing the admin part?
If not can you give me a direction what I can check / change?

Share this post


Link to post
Share on other sites
2 hours ago, LuckyPiedro said:

can you tell me how important this is

It's very important that you change it. That is the web browser title for the home page and is what the search engines see before anything else.  So you want to rank well for my domain name, :), you should change it. That can be done in admin->Header Tags SEO->Page Control for the index.php file.

Share this post


Link to post
Share on other sites

Hi Jack,

Thanks for your quick response. I understand what you mean by adjusting the web browser title in the Admin. Perhaps I think I have not made my question clear.. 🙂 

In your installation instructions it is stated that after installation of the "catalog" part a check is possible for correct functioning, i.e. The (default) web browser title "Replace me in Page Control under index.php - oscommerce-solution.com" should then be visible on the index.php page. If the (default) web browser title is not visible, it must first be resolved before installing the Admin part.

The (default) web browser title is not visible to me and will not be visible if I manually change the relevant database fields.

Before I install admin I would like to fix this. Can you tell me where in the code / which file this (default) web browser title will be inserted?

Thanks in advance,

LuckyPiedro

Share this post


Link to post
Share on other sites

I apologize for the confusion. That text is in the database. Other than manually editing the database, the only way to change it is in Page Control. The code that displays the title is includes/hesder_tags.php.

Share this post


Link to post
Share on other sites

@Jack_mcs

hi Jack,

In the Header Tags SEO V 3.3.6 module, from "includes/modules/header_tags_opengraph.php" you use this script to get the price info :
 

                /**** Get the price ****/
                if (($new_price = tep_get_products_special_price($og['products_id']))) {
                } else {
                    $new_price = $og['products_price'];
                }  
                $og_price = $currencies->display_price($new_price, tep_get_tax_rate($og['products_tax_class_id']));
                $og_price = substr($og_price, 1);

this trick could work for price with US currency (eg. $39.90), but if, like me, you have price in EUR display like this "39.90 €", the result will be from header :

<meta name="twitter:data1" content="9.90&nbsp;€">

<meta property="product:price:amount" content="9.90&nbsp;€" />

instead of :

<meta name="twitter:data1" content="39.90">

<meta property="product:price:amount" content="39.90" />

See you.

 


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

Thanks for pointing that out. The code should be changed to this:

                $og_price = $currencies->display_raw($new_price, tep_get_tax_rate($og['products_tax_class_id']));
                //$og_price = substr($og_price, 1);

 

Share this post


Link to post
Share on other sites
Posted (edited)

Thank you @Jack_mcs

Another (maybe) issue I found today is the update javascript function in "admin/header_tags_seo_social.php" that doesn't update the field content and so don't save the data.
In "Header Tags SEO Social Media"  page, I was not able to update the social URL fields...
I can delete them (delete content and save) but when I try to add content (url) impossible to registred them (!?!).

Could you try from your side, please ?

NB: I have updated with these files from v3.3.7 but same issue as before:
admin/header_tags_seo_social.php
- admin/includes/functions/header_tags.php
- admin/includes/functions/header_tags_general.php

Is there any changes in a TABLE or in another files that could explain this issue ?

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

I'm not sure what you are trying to do. But to save something on that page you have to have the icon checked and text for it in the box assigned to it. It has been a long while since I looked at that code but, I think, you have to use the keywords for the url. The best thing to do is copy the text from another box, like Facebook, paste it into the box you want to change and edit it do it has the correct domain name.  If that doesn't help, please provide the steps needed so I can try it here.

Share this post


Link to post
Share on other sites

Ok I haven't click on the icon, that's why nothing has been registered.
Thank you very much !!!


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

Hi Jack,

Just to mention: when using PHP 7.4 there is an error in  modules/header_tags_seo/header_tags_opengraph.php :  Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` 

Its the statement:    $ogArray['availability'] = ($og['products_date_available'] > date('Y-m-d H:i:s') ? 'pending' :$og['products_quantity'] > 0 ? 'instock' : 'oos');

I guess the resolution is: $ogArray['availability'] = ($og['products_date_available'] > date('Y-m-d H:i:s') ? 'pending' :($og['products_quantity'] > 0 ? 'instock' : 'oos'));

grtz Hans

Share this post


Link to post
Share on other sites

Thanks for reporting this. You will probably run across such warnings a lot, with all addons, since 7.4 is not widely used yet.

Share this post


Link to post
Share on other sites

Hi Jack, 

I noticed today that my Header content meta description is not filled with the data that I put into the categories_htc_description field, but instead its showing the default index text since I moved over to another host and upgraded the mod to version to 3.3.7.  I still use the pre-phoenix (BS) version because my site is  heavily modified (and bootstrap 4 needs a lot of changing).

My index page is not yet modularized.

Can you give me a hint where your code makes the call to insert the standard text instead of the   categories_htc_description . 

Thanks in advance

Hans

 

 

 

 

 

Share this post


Link to post
Share on other sites

Jack, 

Sorry , forget my last post. I probably made a mistake when installing the update causing my htc_description_tag   fields te be  empty. So I restored my old values and its working again.  

Next time i'll check better ;)

regards Hans

Share this post


Link to post
Share on other sites

No problem. I think it is a rule, at least it is for me, that one usually finds a mistake they made only after posting about it. :)

Share this post


Link to post
Share on other sites

hi Jack, @Jack_mcs

Thanks for the addon, installed it on CE1.0.5.0,
image.png.cd40fa07c04851fd546dfd7354c4581a.png

the links are floating and when click on any of the link, the pop up window is blank, is it something that I did wrong to cause the issues?

Many thanks! Lyn

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×