Sitemap export multishop same site code in all store

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
AleksandarJovanovic
Posts: 52
Joined: 01 Jun 2022, 21:26

Sitemap export multishop same site code in all store

Post by AleksandarJovanovic » 04 Oct 2024, 07:15

Php 8.2
Linux
Version 2024.07.

Hello,
I have a small problem with the sitemap export. In all the sitemaps, it shows all products, but they all have the URL of the default shop:
I am running the following commands:


php artisan aimeos:jobs product/export/sitemap default
php artisan aimeos:jobs product/export/sitemap demo

The result in the URL is the same local shop name.

Default:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://localhost:8000/default/shop/defaullt-proizvod</loc><lastmod>2024-10-03T21:46:32+00:00</lastmod></url>
</urlset>


Demo:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://localhost:8000/default/shop/patike-rmfashionlookaaaaaaa</loc><lastmod>2024-10-03T20:31:29+00:00</lastmod></url>
<url><loc>http://localhost:8000/default/shop/job-csv-test-selection</loc><lastmod>2024-10-03T14:28:48+00:00</lastmod></url>
<url><loc>http://localhost:8000/default/shop/proba-123</loc><lastmod>2024-10-03T14:31:00+00:00</lastmod></url>
</urlset>

I found the whole code in sitemap-item.php, but everything seems fine there.
Thanks in advance.

User avatar
aimeos
Administrator
Posts: 8249
Joined: 01 Jan 1970, 00:00

Re: Sitemap export multishop same site code in all store

Post by aimeos » 04 Oct 2024, 14:43

This is currently a problem when you create the sitemaps for each site one by one and we will fix that in the next release. To get correct URLs for all site, export all sitemaps at once please:

Code: Select all

php artisan aimeos:jobs product/export/sitemap
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
AleksandarJovanovic
Posts: 52
Joined: 01 Jun 2022, 21:26

Re: Sitemap export multishop same site code in all store

Post by AleksandarJovanovic » 04 Oct 2024, 15:46

I try, in that case is generete all sitemaps which is ok but the same problem exist. The url of all sitemap is on default shop.

User avatar
aimeos
Administrator
Posts: 8249
Joined: 01 Jan 1970, 00:00

Re: Sitemap export multishop same site code in all store

Post by aimeos » 04 Oct 2024, 15:49

The problem is this if-condition:
https://github.com/aimeos/ai-controller ... ms.php#L43

If it's removed, it works as expected.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
AleksandarJovanovic
Posts: 52
Joined: 01 Jun 2022, 21:26

Re: Sitemap export multishop same site code in all store

Post by AleksandarJovanovic » 04 Oct 2024, 15:54

It works:)

Thank you

Post Reply