s06e02 - XML Sitemaps SUPPORT / QUESTIONS

Open to all! Ask other shopowners for help.
User avatar
Pierre_P
Contributor
Posts: 144
Joined: Fri Mar 12, 2021 5:06 am
Phoenix Version: v1.1.0.6
Has thanked: 21 times
Been thanked: 11 times

Re: s06e02 - XML Sitemaps

Post by Pierre_P »

Wanting to know if there is a way to rather run this as a cron job?
When working in Admin catalog it is really slowing down after each product save.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4547
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s06e02 - XML Sitemaps

Post by burt »

You could get rid of the Hook that calls the XML_writer.
Then manually perform a XML update using the Dashboard module, which should have button "renew All"
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: s06e02 - XML Sitemaps

Post by heatherbell »

Extend this Addon for an XML Sitemap for InfoPages.
Edit
/includes/system/override/gb/xml_writer.php
after L 59

Code: Select all

break;
add

Code: Select all

        case 'pages':
          self::delete_xml($what);

          $changefreq = 'monthly';
          $priority = 0.5;
          $page = 'info.php';
          $name = 'pages_id';
          
          $arr = [];
          $pages = info_pages::get_pages();
          foreach ($pages as $k => $v) {
            if ($v['pages_status'] == 1) {
              $arr[$k]['id'] = $v['pages_id'];
              $arr[$k]['da'] = $v['date_added'];
              $arr[$k]['lm'] = $v['last_modified'];
            }
          }
          
          break;
In /includes/hooks/admin/info_pages/ (create that directory named info_pages if does not already exist)
create a file named XML_writer.php
with contents

Code: Select all

<?php
class hook_admin_info_pages_XML_writer {

  public function listen_setFlagAction() {
    xml_writer::do_XML('pages');
  }
  public function listen_addNewAction() {
    xml_writer::do_XML('pages');
  }
  public function listen_updateAction() {
    xml_writer::do_XML('pages');
  }
  public function listen_deleteConfirmAction() {
    xml_writer::do_XML('pages');
  }
}
Just tested on a live shop 1.0.8.21 PHP8 and works.
Useful? Buy Me A Beverage!
bitit
Member
Posts: 84
Joined: Thu Jun 24, 2021 4:00 pm
Phoenix Version:
Has thanked: 1 time
Been thanked: 3 times

Re: s06e02 - XML Sitemaps

Post by bitit »

Hi Everyone; i have some problem with Ultimate SEO URL ,
so i have installed "Name_Based_URLs_Pro" and "s06e02 - XML Sitemaps";
in the eshop i have two language,
but the result in sitemap xml files is only the primary language.

Some solution about?
Enrico
User avatar
burt
Core Team
Posts: 4547
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s06e02 - XML Sitemaps

Post by burt »

As far as I recall, this addon is language independent.

In other words, it uses nothing "language" based;

http://XYZshop.com/product_info.php?products_id=1

Whereas your URL rewriter probably does some language stuff;

http://XYZshop.com/en/abc_p1.php
http://XYZshop.com/it/def_p1.php

for the same product.

Therefore, you need to do one of the following;

1. don't use URL rewriting
2. don't use this Addon
3. get the URL rewriting addon recoded
4. get this addon recoded

Of these four, assuming you want to continue to use both addons, the easiest solution is #4 (get this addon recoded to your needs).

In short;

This addon uses Admin side URL writing.
You need this addon to use Shop side URL writing.

So far as I am aware, every one of these "URL rewriting" addons neglect the Admin side URL writing :(
I am not here to build for you.
I am here to build with you. Let's help each other.
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: s06e02 - XML Sitemaps

Post by raiwa »

burt wrote: Wed Feb 28, 2024 3:38 pm This addon uses Admin side URL writing.
You need this addon to use Shop side URL writing.

So far as I am aware, every one of these "URL rewriting" addons neglect the Admin side URL writing :(
Compatibility between Name based URLs Lite/Pro and your xml sitemap has been added in Phoenix 1.0.8.19
There was a discussion that addons which are bundled in Phoenix Pro should work together and @ecartz added therefore the necessary support.
It is tested also for multilanguage and I'm using it in a multilanguage live store without issues.
See this and previous posts in this thread:
Omar_one wrote: Mon Oct 17, 2022 5:30 pm
raiwa wrote: Mon Oct 17, 2022 9:58 am Yes, using Phoenix Pro 1.0.8.19 as a base.
Thank you ,, we are still on 1.0.8.16 , will come back to you when I update and fix a few issues
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
User avatar
burt
Core Team
Posts: 4547
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s06e02 - XML Sitemaps

Post by burt »

Great :+1:

I think this means;
@bitit here is your answer
Update to v1.0.8.19 PRO at least.

@raiwa maybe would confirm this advice?
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: s06e02 - XML Sitemaps

Post by raiwa »

burt wrote: Wed Feb 28, 2024 6:19 pm Great :+1:

I think this means;
@bitit here is your answer
Update to v1.0.8.19 PRO at least.

@raiwa maybe would confirm this advice?
Yes
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
bitit
Member
Posts: 84
Joined: Thu Jun 24, 2021 4:00 pm
Phoenix Version:
Has thanked: 1 time
Been thanked: 3 times

Re: s06e02 - XML Sitemaps

Post by bitit »

Ok Actually i use phoenix 1.8.0.20, if i have understand is present a version pro of phoenix, where i can download it?

at the moment i can creating a xml for each language, changing the administrative language; but in one file that become overwrite each time; the result is a sitemap with only a language

Enrico
kudos
Member
Posts: 20
Joined: Sat Jan 16, 2021 8:48 pm
Phoenix Version:
Has thanked: 1 time

Re: s06e02 - XML Sitemaps

Post by kudos »

just upgraded my store to v1.9.1

in the admin panel i now get this
Fatal error: Uncaught Error: Call to undefined function tep_draw_bootstrap_button() in public_html/admin/includes/modules/dashboard/d_xml.php:57 Stack trace: #0 public_html/admin/index.php(56): d_xml->getOutput() #1 {main} thrown in public_html/admin/includes/modules/dashboard/d_xml.php on line 57


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply