2017 © Pedro Peláez
 

library open-graph

Implementation of the Facebook Open Graph protocol for Spryker

image

fond-of-spryker/open-graph

Implementation of the Facebook Open Graph protocol for Spryker

  • Wednesday, May 30, 2018
  • by daniel-rose
  • Repository
  • 2 Watchers
  • 0 Stars
  • 333 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 107 % Grown

The README.md

Open Graph integration for Spryker

Build Status PHP from Travis config license, (*1)

A Basic implementation of the Facebook Open Graph protocol for Spryker, (*2)

Installation

composer require fond-of-spryker/open-graph

1. Enable the Module in the configuration file

// ---------- Google Tag Manager
$config[OpenGraphConstants::ENABLED::ENABLED] = true;

2. Add Product Image Property Configurations in the configuration file

$config[OpenGraphConstants::PRODUCT_IMAGE_SET] = 'default';
$config[OpenGraphConstants::PRODUCT_IMAGE_URL_TYPE] = 'externalUrlLarge';

3. Add twig service provider to YvesBootstrap.php in registerServiceProviders()

$this->application->register(new OpenGraphTwigServiceProvider());

4. Add the Twig Extension in the neccessary Twig Templates

  Application/layout/layout.twig 
  between <head></head> tags

    {# Open Graph Protocol for Facebook and SEO #}
    {% block opengraph %}
        {% set params = {
            'title': 'global.shop.title' | trans,
            'description': '',
            'url': app.request.uri,
            'type': 'website',
            'site_name': app.locale | slice(0, 2)
        }
        %}
        {{ openGraph(params)}}
    {% endblock %}
  Catalog/catalog/index.twig 
  {% block opengraph %}
      {% set params = {
          'title': category.name,
          'description': '',
          'url': app.request.uri,
          'type': 'website',
          'site_name': '....'
      }
      %}
      {{ openGraph(params)}}
  {% endblock %}
  Product/product/detail.twig  
  {% block opengraph %}
      {% set params = {
          'title': product.name,
          'description': product.description,
          'url': app.request.uri,
          'type': 'product',
          'site_name': '...',
          'product': product
      }
      %}
      {{ openGraph(params)}}
  {% endblock %}

The Versions

30/05 2018

dev-master

9999999-dev

Implementation of the Facebook Open Graph protocol for Spryker

  Sources   Download

MIT

The Requires

  • php >=7.1
  • spryker/kernel ^3.0.0
  • spryker/product ^6.0.0

 

The Development Requires

by Daniel Rose
by Markus Nörenberg
by Pascal Fischer
by Jozsef Geng

30/05 2018

1.0.0

1.0.0.0

Implementation of the Facebook Open Graph protocol for Spryker

  Sources   Download

MIT

The Requires

  • php >=7.1
  • spryker/kernel ^3.0.0
  • spryker/product ^6.0.0

 

The Development Requires

by Daniel Rose
by Markus Nörenberg
by Pascal Fischer
by Jozsef Geng

16/04 2018

1.0.0-RC1

1.0.0.0-RC1

Implementation of the Facebook Open Graph protocol for Spryker

  Sources   Download

MIT

The Requires

  • php >=7.1
  • spryker/kernel ^3.0.0
  • spryker/product ^6.0.0

 

The Development Requires

by Daniel Rose
by Markus Nörenberg
by Pascal Fischer
by Jozsef Geng