app/Plugin/SEOAllOne42/Resource/template/json-ld.twig line 1

Open in your IDE?
  1. <script type="application/ld+json">
  2. {
  3.   "@context": "http://schema.org/",
  4.   "@type": "Product",
  5.   "name": "{% if Product.seo_title is defined and Product.seo_title is not null %}{{ Product.seo_title }}{% else %}{{ Product.name }}{% endif %}",
  6.   "image": [{% if Product.ProductImage|length > 0 %}{% for ProductImage in Product.ProductImage %}{% if loop.index > 1 %},{% endif %}"{{url('homepage')}}html/upload/save_image/{{ ProductImage|no_image_product }}"{% endfor %}
  7. {% else %}
  8. "{{ eccube_config.eccube_save_image_dir }}/{{ ''|no_image_product }}"{% endif %}],
  9.   "description": "{{ Product.description_detail|striptags|raw}}",
  10.   {% if Product.json_category is defined %}
  11.   "category":[{% for Category in  Product.json_category%}{% if loop.last %}"{{ Category }}"{% else %}"{{ Category }}",{% endif %}{% endfor %}],
  12.   {% endif %}
  13.   "brand": {
  14.     "@type": "Brand",
  15.     "name": "{{ BaseInfo.shop_name }}"
  16.   },
  17.   "sku": "{{ Product.id }}",
  18. {% if Product.global_id is defined and Product.global_id is not null %}  "{{ Product.global_id_type }}": "{{ Product.global_id }}",
  19. {% endif %}
  20.   "offers": {
  21.     "@type": "Offer",
  22.     "url": "{{ url('product_detail', {'id': Product.id}) }}",
  23.     "priceCurrency": "JPY",
  24.     "price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  25. {% if Product.valid_price_until is defined and Product.valid_price_until is not null %}    "priceValidUntil": "{{ Product.valid_price_until }}",
  26. {% endif %}
  27.     "itemCondition": "http://schema.org/NewCondition",
  28.     "availability": {% if Product.stock_find %}"http://schema.org/InStock"{% else %}"http://schema.org/OutOfStock"{% endif %},
  29.     "seller": {
  30.       "@type": "Organization",
  31.       "name": "{{ BaseInfo.company_name }}"
  32.     }
  33.   }
  34. }
  35. </script>