Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Information Pages SEO addon


Jack_mcs

Recommended Posts

14 hours ago, ce7 said:

I noticed when i create a message, the view has diabled, how can I enable and make it act like page, click on it and will open in new page?

There's no way to do that since the message is part of a page and can be displayed anywhere. For example, if you set it to display in a header module so that the message is displayed on every page, what page would open when View is clicked in admin? If you (anyone) can think of a way to this, or how it could be improved, please let me know and I will take a look.

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

  • 1 month later...

@ce7I can''t enlarge the image enough to see the problem. But, in general, if you want a link to show up in only one module set its box ID to that modules ID.

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

  • 4 weeks later...

Hi Jack,

I have altered your code a little since I needed the following functionality: I wanted to display an information page link on my product_info page for all products  belonging to a specific manufacturer. And I wanted it to be displayed on the product info screen (not in a box) . What I did is changed your code in cm_pi_information_pages.php. 

Your origin:

              $where = "pages = 'all'";
              if (isset($_GET['cPath'])) {
                  $where .= " or FIND_IN_SET ('cid',pages) or FIND_IN_SET ('cid=" . tep_db_input($_GET['cPath']) . "',pages) ";               
              } else if (isset($_GET['manufacturers_id'])) {
                  $where .= " or FIND_IN_SET ('mid',pages) or FIND_IN_SET ('mid=" . tep_db_input($_GET['manufacturers_id']) . "',pages) ";                   
              } else if (isset($_GET['products_id'])) {
                  $where .= " or FIND_IN_SET ('pid',pages) or FIND_IN_SET ('pid=" . tep_db_input($_GET['products_id']) . "',pages) "; 
              }

My changes:

              $where = "pages = 'all'";
             if (isset($_GET['products_id'])) {
                  $where .= " or FIND_IN_SET ('pid',pages) or FIND_IN_SET ('pid=" . tep_db_input($_GET['products_id']) . "',pages) "; 
                  if  (INFORMATION_PAGES_SEO_ALSO_MAN_PAGES === 'true'){      
                    //find corresponding manufacturers_id 
                     $man_id=tep_db_fetch_array(tep_db_query("select manufacturers_id  from products where products_id='". tep_db_input($_GET['products_id'])."' limit 1"));
                     $where .= " or FIND_IN_SET ('mid=" . $man_id['manufacturers_id'] . "',pages) "; 
                  }

              }

I removed the first part of your code since in product_info I believe there is no cPath or manufacturers_id being populated in the form when calling product_info.php. I added a new parameter.  If this is set to true the pages belonging to that manufacturer are also shown in the product page.

Maybe this feature is interesting for u to add to your great contribution. 

 

Link to comment
Share on other sites

11 hours ago, koopmanh said:

Maybe this feature is interesting for u to add to your great contribution. 

Thank you for posting it. I will take a look at it when I get a chance. But, to be clear, the original code allows cross-referencing to any page, depending on the settings for the IP page. So your change has removed that functionality. 

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

  • 1 month later...

Hello Jack, Mendoh here. 

I have tried to install your contribution on the very latest Phoenix 1.0.7.5 and despite I have triple-checked everything, I could not get it to work. 
Admin seems to work, however:
1) no line title or name is displayed for each new page on the admin list of added pages
2) trying to install the "information pages block" footer content module gets me the following error:

1146 - Table 'mystoredb_2.TABLE_CONFIGURATION' doesn't exist

insert into TABLE_CONFIGURATION (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Information Pages Links Footer Module', 'MODULE_CONTENT_FOOTER_INFORMATION_PAGES_STATUS', 'True', 'Do you want to enable the Information Pages Links content module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())

[TEP STOP]


On top of the above, after adding a new page on admin, its name/title (the very same that does not show on admin list of new pages) actually shows as a link in the "Helpful Links" information box on the store side, however,  clicking on either such link or the "view" icon for the same page on the admin side, delivers another error: 


This page isn’t working
Yourwebsite is currently unable to handle this request.
HTTP ERROR 500

Can you point me out on what is wrong with my install or is it just the contribution to be incompatible with Phoenix 1.0.7.5?

Thank you

Link to comment
Share on other sites

It won't work in any Phoenix version after 1.0.4. The latest version will work in 1.0.7.5 (I have it installed here) but I can't say when it will be uploaded since it is not ready for release. So, for now, you should remove the changes you've made since the changes in the new version won't match them. 

Just for reference, when installing any addon into Phoenix, it is best to verify the addon will work in that version of Phoenix. The code in Phoenix changes quite often, sometimes dramatically, so it usually isn't possible for developers to provide versions of their addons for all Phoenix versions.

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

@mendoh

17 hours ago, mendoh said:

1146 - Table 'mystoredb_2.TABLE_CONFIGURATION' doesn't exist

insert into TABLE_CONFIGURATION (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Information Pages Links Footer Module', 'MODULE_CONTENT_FOOTER_INFORMATION_PAGES_STATUS', 'True', 'Do you want to enable the Information Pages Links content module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())

[TEP STOP]

Find the code above, and change it to:

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Information Pages Links Footer Module', 'MODULE_CONTENT_FOOTER_INFORMATION_PAGES_STATUS', 'True', 'Do you want to enable the Information Pages Links content module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())

M

Link to comment
Share on other sites

4 hours ago, ArtcoInc said:

@mendoh

Find the code above, and change it to:

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Information Pages Links Footer Module', 'MODULE_CONTENT_FOOTER_INFORMATION_PAGES_STATUS', 'True', 'Do you want to enable the Information Pages Links content module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())

M

Thanks Artcolnc! 

Unfortunately, the one above is only half of the problem: 

 

21 hours ago, mendoh said:

 

On top of the above, after adding a new page on admin, its name/title (the very same that does not show on admin list of new pages) actually shows as a link in the "Helpful Links" information box on the store side, however,  clicking on either such link or the "view" icon for the same page on the admin side, delivers another error: 


This page isn’t working
Yourwebsite is currently unable to handle this request.
HTTP ERROR 500

Can you point me out on what is wrong with my install or is it just the contribution to be incompatible with Phoenix 1.0.7.5?

Thank you

😥

Link to comment
Share on other sites

  • 3 weeks later...

A new version has been uploaded with these changes:

Added a left column icon for Phoenix.
Added a title for the Pages and Redirect boxes in admin to provide instruction for using them.
Added a Navbar module. Pro Version only.**
Changed the code for displaying cross-reference links on the product page for a better display.
Changed name of shops language file from information_pages to information so the shops code loads it automatically.
Corrected a coding mistake in the footer module that caused the display to not be correct.
Moved changes for application_top files into hooks (Phoenix only).
Updated the Version Checker to return correct versions.

** The new Navbar module allows messages to be displayed as pages, which greatly increases the flexibility.

Edited by Jack_mcs

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

14 hours ago, Jack_mcs said:

A new version has been uploaded with these changes:

Thanks you again for you work on this addon, however the link is broken it just takes you to the top of the page.

 

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

@mhsuffolkThanks for letting me know. I tried editing it but it wouldn't allow it. Then I tried adding a new link in this post and it still ignored it so there must be something wrong with the forum software. Here is the link without using the editor:


https://apps.oscommerce.com/k6oAF&information-pages-seo-v-1-0

Edited by Jack_mcs

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

7 hours ago, ce7 said:

Warning: Use of undefined constant INFORMATION_PAGES_SEO_FOOTER_XREF_USE_UL

That is defined in the database so you must not have ran the database script with the reset option. Do that and the error should go away.

I can't help you with getting a certain editor to work. I used the TinyMCE  addon to test it since it doesn't require any core changes and it works fine,

For the article message showing, enter something in the Pages box. If you don't want it to show at all, enter some invalid item, like pid=999999, assuming that is not valid on your site. I'll add an off option in the next version.

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

1 hour ago, ce7 said:

I have the database installed, but I will double check it again. Maybe something goes wrong.

If you did a new installation, then the database should be correct. But if you did an update, you may have to run the install script twice, depending on the version. On the second run, or maybe the first one, there will be a button that says run with reset. Click on that and any new differences will be applied.

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

Good catch on the database error. I do apologize for the problems it caused. The previous versions used INFORMATION_PAGES_SEO_XREF_USE_UL' but it was changed to INFORMATION_PAGES_SEO_FOOTER_XREF_USE_UL' to allow handling the bod id's easier. And I see now that IO forgot to mention that as part of the update.

Regarding the position of the box, the answer depends on how the recently viewed addon is placing the code. This addon is using a hook for that box. The only way hooks are sortable are by their names so if that addon uses a hook, you could do some renaming to get them placed as you want. But if it is using a module, you can't do it.

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