Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新着商品・新着情報のRSSフィード機能 #4908

Merged
merged 5 commits into from Mar 12, 2021

Conversation

matsuoshi
Copy link
Contributor

概要(Overview・Refs Issue)

新着商品と、新着情報(ニュース) のRSSフィードを出力する機能を実装しました。

関連issue

方針(Policy)

実装に関する補足(Appendix)

  • テンプレートファイルの default_frame.twig に、RSSへのリンクを示すタグを追加しています
  • RSSフィードへのパスは以下となります
    • /products_feed.xml
    • /news_feed.xml

テスト(Test)

  • Webテストにて 商品・新着情報とも、XML形式で内容が出力されていることを確認

相談(Discussion)

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更
  • フックポイントの呼び出しタイミングの変更
  • フックポイントのパラメータの削除・データ型の変更
  • twigファイルに渡しているパラメータの削除・データ型の変更
  • Serviceクラスの公開関数の、引数の削除・データ型の変更
  • 入出力ファイル(CSVなど)のフォーマット変更

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか

@chihiro-adachi chihiro-adachi added the enhancement 機能追加 label Feb 9, 2021
@chihiro-adachi chihiro-adachi added this to the 4.1 milestone Feb 9, 2021
@chihiro-adachi chihiro-adachi changed the base branch from 4.0 to 4.1-feature February 9, 2021 07:23
@okazy okazy added the affected:template フロントテンプレートの変更 label Feb 15, 2021
src/Eccube/Controller/RssFeedController.php Outdated Show resolved Hide resolved
<title>{{ BaseInfo.shop_name }} 新着情報</title>
<description>{{ BaseInfo.shop_name }} 新着情報</description>
<link>{{ url('homepage') }}</link>
<lastBuildDate>{{ "now" | date(constant('DATE_RFC822')) }}</lastBuildDate>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lastBuildDate | The last time the content of the channel changed.
https://validator.w3.org/feed/docs/rss2.html#optionalChannelElements

なので、お知らせの最終更新日時がいいかと思います。(商品情報も同様)

src/Eccube/Resource/template/default/Feed/news.xml.twig Outdated Show resolved Hide resolved
<atom:link href="{{ url('rss_feed_for_news') }}" rel="self"/>

{% for article in news %}
<item>
<title>{{ article.title }}</title>
<title>{{ article.title }}
</title>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改行が入ってテストが落ちてしまっているようです。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiy0taka すいません、修正しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected:template フロントテンプレートの変更 enhancement 機能追加
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants