valquiria23 Posted June 18, 2019 Share Posted June 18, 2019 Hello Jack, @Jack_mcs how are you? Sorry, I got confused by topic in my last question . This addon (Google XML Sitemap SEO) generates an XML file sitemapimages.xml that contains all the images of the site if I am not wrong.... Now for what I saw in my web site it only covers the main image of the product. If I add a Large Image (or several) they are not added to the sitemapimages.xml file. That's right? Best regards Valqui Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 18, 2019 Author Share Posted June 18, 2019 Hi Valquiria . :) The sitemapimages.xml only contains the main image for the product. The main image is stored in the products table but any additional images are stored in the products_images table and the code in this addon doesn't access that table. It would be possible but would not be a simple code change. valquiria23 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
valquiria23 Posted June 18, 2019 Share Posted June 18, 2019 Thank you very much Jack, @Jack_mcs for the clarification of the doubt. In my opinion it would be interesting and necessary to add those images in future updates of this addon, do not you think the same? Best regards Valqui Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 18, 2019 Author Share Posted June 18, 2019 Yes, I think it would be helpful. It was requested for the google base feeder too. I added it to that addon and will to this one eventually but it will be quite a while before I can get to it. valquiria23 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 19, 2019 Author Share Posted June 19, 2019 If you are asking if this addon is necessary, then yes, it is. All of the search engines look for sitemaps so having one will help your site. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Zzyzx1234 Posted October 18, 2019 Share Posted October 18, 2019 Just started using this but for some reason i cant get the cron job to work. The command suggested by my host is "/usr/local/bin/ea-php56 /***/***/public_html/googlesitemap/index.php". Have also tried "php /***/***/public_html/googlesitemap/index.php" and neither work. If triggered manually it updates, any have a suggestion? Thanks Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 18, 2019 Author Share Posted October 18, 2019 Try this, after adjusting the locations to fit your server: cd /home/***/public_html/googlesitemap/; /usr/local/bin/php -c /home/***/public_html/php.ini -q /home/***/public_html/googlesitemap/index.php If that doesn't work, ask your host to let you know what the cron error is. Or change the email address in cron to a working one, assuming it isn't already set that way, and see what the email says. Zzyzx1234 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Zzyzx1234 Posted October 18, 2019 Share Posted October 18, 2019 Thank you that worked Quote Link to comment Share on other sites More sharing options...
vmn Posted November 12, 2019 Share Posted November 12, 2019 On 5/8/2019 at 12:55 AM, boelle said: how can i mod the scripts so it saves the sitemaps to a folder and not in the root? I just started using this addon in my v2.3.4.1 CE. I noticed that anybody knowing the name of googlesitemap directory can run the sitemap creation. This may not be harmful, but the result page revealed my full Cpanel path, including my user id. I first renamed the directory. This also required some code changes, which I made. I also protected the directory with .htaccess: Require ip my.server.ip Require forward-dns my.dynamic.vpn.adddress This code seems to have no effect, whether it is in application_top.php or not: /**** Begin Google Sitemap Manual Run ****/ if (strpos(GOOGLE_XML_SITEMAP_MANUAL_IP, $_SERVER['REMOTE_ADDR']) !== FALSE) { $future_date = strtotime('+' . GOOGLE_XML_SITEMAP_MANUAL_RUN . ' day'); if ($future_date <= date('Y-m-d')) { tep_redirect(HTTP_SERVER . DIR_WS_HTTPS_CATALOG . 'googlesitemap/index.php'); // } } /**** End Google Sitemap Manual Run ****/ Did I miss something? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 12, 2019 Author Share Posted November 12, 2019 36 minutes ago, vmn said: I noticed that anybody knowing the name of googlesitemap directory can run the sitemap creation. You could use the Secure IP option in the settings. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
vmn Posted November 12, 2019 Share Posted November 12, 2019 1 hour ago, Jack_mcs said: You could use the Secure IP option in the settings. I could not find any reference to GOOGLE_XML_SITEMAP_SECURE_IP in the code. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 12, 2019 Author Share Posted November 12, 2019 I see the code in my shop but not in the package. I must have forgot to include it or deleted in an earlier version. I do apologize for the mistake. To fix it, edit the googlesitemap/index.php file and find this line: include_once('includes/application_top.php'); and add this below it: if (! empty(GOOGLE_XML_SITEMAP_SECURE_IP)) { $safe_ips = explode(',', GOOGLE_XML_SITEMAP_SECURE_IP); if (! in_array($_SERVER['REMOTE_ADDR'], $safe_ips)) { header("location:http:127.0.0.1"); } } Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
vmn Posted November 13, 2019 Share Posted November 13, 2019 Thanks, GOOGLE_XML_SITEMAP_SECURE_IP is working now. Quote Link to comment Share on other sites More sharing options...
vmn Posted November 17, 2019 Share Posted November 17, 2019 I could not get the running from command-line to work without the following changes. My catalog resides in a sub-folder where I also wanted to put the sitemap. I'm redirecting all traffic pointing to document root to a sub-folder called portal. The direcotry structure is: / /portal /shop Maybe this is why it did not work. in index.php after include_once('includes/application_top.php'); insert $run_env = php_sapi_name(); echo 'Environment:' . $run_env . "\n"; if ($run_env === 'cli' || $run_env === 'cgi-fcgi') { //DO NOT CHECK IP } else { if (! empty(GOOGLE_XML_SITEMAP_SECURE_IP)) { $safe_ips = explode(',', GOOGLE_XML_SITEMAP_SECURE_IP); if (! in_array($_SERVER['REMOTE_ADDR'], $safe_ips)) { header("location:http:127.0.0.1"); } } } after echo 'For your convenience here is the <strong>CRON command</strong> for your site:' . "\n\n"; replace echo "\t" . '<strong>php ' . dirname($_SERVER['SCRIPT_FILENAME']) . '/index.php</strong>' . "\n\n"; with echo "\t" . '<strong>php ' . __FILE__ . '</strong>' . "\n\n"; in sitemap.class.php before $this->base_url = $domain_name; add $run_env = php_sapi_name(); if ($run_env === 'cli' || $run_env === 'cgi-fcgi') { if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'this->savepath:' . $this->savepath . "\n"; $temp = getcwd(); $temp .= (substr($temp, -1) !== '/') ? '/' : ''; //append a slash if needed if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'temp:' . $temp . "\n"; if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'DIR_FS_CATALOG:' . DIR_FS_CATALOG . "\n"; $this->savepath = substr($temp, 0, strpos($temp, DIR_FS_CATALOG)) . $this->savepath; if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'this->savepath:' . $this->savepath . "\n"; } I noticed that categories are retrieved multiple times (in all shop languages): find $sql = "SELECT c.categories_id as cID, c.date_added, c.last_modified as last_mod replace $sql = "SELECT distinct c.categories_id as cID, c.date_added, c.last_modified as last_mod after $path = (($pos = strpos(DIR_FS_CATALOG, "googlesitemap")) !== FALSE) ? substr(DIR_FS_CATALOG, 0, -strlen('googlesitemap') - $slash) : DIR_FS_CATALOG; insert $run_env = php_sapi_name(); if ($run_env === 'cli' || $run_env === 'cgi-fcgi') { if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'path:' . $path . "\n"; $temp = getcwd(); $temp .= (substr($temp, -1) !== '/') ? '/' : ''; //append a slash if needed if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'temp:' . $temp . "\n"; if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'DIR_FS_CATALOG:' . DIR_FS_CATALOG . "\n"; $path = substr($temp, 0, strpos($temp, DIR_FS_CATALOG)) . $path; if (GOOGLE_XML_SITEMAP_SHOW_DIAGNOSTIC == 'true') echo 'path:' . $path . "\n"; } There is some unnecessary stuff, e.g.: class MySQL_DataBase (because DB handling is done in the core). I removed all usage of the class MySQL_DataBase. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 1, 2019 Author Share Posted December 1, 2019 A new version has been uploaded. It includes the missing security code mentioned previously. valquiria23 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
valquiria23 Posted December 2, 2019 Share Posted December 2, 2019 Thank you very much Jack @Jack_mcsfor your support of the OSC community. Especially for your excellent support and for SHARING. Cheers Valqui Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
Chadduck Posted December 4, 2019 Share Posted December 4, 2019 Jack, THANKS FOR THIS GREAT ADD ON. The insertion of the "Manual IP" text during the install works fine - However when an individual tries to update the IP they are greeted with this error 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's with a comma.- Manual mode only')' at line 1 insert into configuration_changes (change_date,previous_setting,new_setting,change_title,change_description) values (now(),'127.0.0.1','XXX.XXX.XXX.XX','Manual IP','Enter the IP that you want to cause the manual run to happen. Separate muliple IP's with a comma.- Manual mode only') [TEP STOP] It is caused by this portion of the configuration text " Separate muliple IP's with a comma." removing the apostrophe removes the error. As long as you are correcting it - there is also a "t" missing from the word multiple BJ Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 5, 2019 Author Share Posted December 5, 2019 5 hours ago, Chadduck said: It is caused by this portion of the configuration text It works fine for me as is in my shop and in others I've it into. Maybe it has to do with the version of your shop and/or php/MySQ. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Chadduck Posted December 5, 2019 Share Posted December 5, 2019 11 hours ago, Jack_mcs said: Maybe it has to do with the version of your shop and/or php/MySQ. Ubuntu 18.04.3 LTS MySQL Server version: 5.7.28-0ubuntu0.18.04.4 PHP version: 7.2.24-0ubuntu0.18.04.1 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 5, 2019 Author Share Posted December 5, 2019 If you used the php script to install the database, I can't think of a reason why it should fail. I haven't tried it in the latest Phoenix version so I suppose that could be an issue, though it seems unlikely. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Chadduck Posted December 5, 2019 Share Posted December 5, 2019 Dunno... As I pointed out originally once I removed the apostrophe the IP update went right through. I simply thought you would want to know which is why I cut and pasted the sql error. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 5, 2019 Author Share Posted December 5, 2019 1 hour ago, Chadduck said: I simply thought you would want to know which is why I cut and pasted the sql error. I do appreciate it. Even though I can't reproduce it, others may have the problem and your fix might help them. Thank you for posting it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Chadduck Posted December 5, 2019 Share Posted December 5, 2019 No problem - and again thanks for your wonderful mods. I certainly appreciate them as I am sure the entire OSC community does. Quote Link to comment Share on other sites More sharing options...
♥ecartz Posted December 5, 2019 Share Posted December 5, 2019 array("INSERT INTO configuration (" . $fields_short . ") VALUES ('Manual IP', 'GOOGLE_XML_SITEMAP_MANUAL_IP', '127.0.0.1', 'Enter the IP that you want to cause the manual run to happen. Separate muliple IP\'s with a comma.- <b>Manual mode only</b>', '" . $cfg_group_id . "', '" . ($sortID++) . "', now())"), There the unnecessary apostrophe is escaped properly. insert into configuration_changes Now that's interesting. What is configuration_changes and why is something being inserted into it? Might it possibly be some other change to your site that make it different? If you figure out what inserts things in configuration_changes, you might know what is breaking. Then you can fix that so that it escapes apostrophes properly. Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
♥ecartz Posted December 5, 2019 Share Posted December 5, 2019 (edited) On 12/4/2019 at 3:21 PM, Chadduck said: The insertion of the "Manual IP" text during the install works fine - However when an individual tries to update the IP they are greeted with this error Found it. The App is called Store Configuration Monitor and it has a bug in its helper functions. In admin/includes/functions/general.php change the two functions to function tep_configuration_update($cID, $configuration_value) { $configuration_values_query = tep_db_query("select configuration_value, configuration_title, configuration_description from configuration where configuration_id = '" . (int)$cID . "'"); $configuration_values = tep_db_fetch_array($configuration_values_query); tep_db_query("insert into configuration_changes (change_date,previous_setting,new_setting,change_title,change_description) values (now(),'". tep_db_input(tep_db_prepare_input($configuration_values['configuration_value'])) ."','". tep_db_input(tep_db_prepare_input($configuration_value)) ."','". tep_db_input(tep_db_prepare_input($configuration_values['configuration_title'])) ."','". tep_db_input(tep_db_prepare_input($configuration_values['configuration_description']))."')"); // Check to see if the configuration value changed is the Store Owner's Email address - if it is send a configuration change notification to the existing Email address on file. if($cID == 3) { tep_mail(STORE_OWNER, $configuration_values['configuration_value'], EMAIL_CONFIGURATION_CHANGE_TEXT_SUBJECT, EMAIL_CONFIGURATION_CHANGE_TEXT_BODY, STORE_OWNER, $configuration_values['configuration_value']); } tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_CONFIGURATION_CHANGE_TEXT_SUBJECT, EMAIL_CONFIGURATION_CHANGE_TEXT_BODY, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } function tep_module_change($action, $class) { tep_db_query("insert into configuration_changes (change_date,previous_setting,new_setting,change_title,change_description) values (now(),'','". tep_db_input(tep_db_prepare_input($action)) ."','". tep_db_input(tep_db_prepare_input($class)) ."','')"); tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_CONFIGURATION_CHANGE_TEXT_SUBJECT, EMAIL_CONFIGURATION_CHANGE_TEXT_BODY, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } Then you should be able to update values normally in admin. Edited December 5, 2019 by ecartz Chadduck 1 Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.