Skip to content

mabarroso/PrestaShop-twittercard

Repository files navigation

#Twitter Cards Twitter Cards module for Prestashop.

#Description Add Twitter Cards metas in the products pages and make it possible for you to attach media experiences to Tweets that link to your products.

Twitter Cards help you richly represent your content within Tweets across the web. This gives users greater context and insight into the URLs shared on Twitter, which in turn allows Twitter to send more engaged traffic to your site.

##How works When a customer make a Tweet linked to a product will show the product image, name and description.

For a product page like this

This module add Twitter Card metas in your products pages.

  <meta name="twitter:card" content="summary" />
  <meta name="twitter:site" content="@prestashop" />
  <meta name="twitter:creator" content="@prestashop" />
  <meta name="twitter:url" content="http://demo-store.prestashop.com/en/evening-dresses/27-visconti-co-evening-dress.html" />
  <meta name="twitter:title" content="Visconti & Co. Evening Dress" />
  <meta name="twitter:description" content="This simple yet elegant dress is ideal for any special occasion. The ruched detailing and the handsewn beading accent your neckline, and the straps are trimmed so they won't scratch your neck. Its cream color is so easy to match with any handbag or shoes, there's no reason not to own it!" />
  <meta name="twitter:image" content="http://demo-store.prestashop.com/27-50-large/visconti-co-evening-dress.jpg" />

##Benefits for the e-merchant Add Twitter Cards support to your products page and make it possible for you to attach media experiences to Tweets that link to your products.

The new Tweets linked to your products will be more attractive and, probably, it makes more clicks to your site.

##Benefits for the customer Customers who make a Tweet linked to a product will show the product image, name and description.

##Features:

  • Automatic catch product title, image and description
  • Configure twitter site and creator accounts

##Installing the module After install, you must set your twitter account name in the module configuration page.

You can test the Twitter Cards results at preview page

You must request you participation in Twitter Cards (this take several days by approval Twitter Team). Fill the form

##Recommandations You could read the official Twitter documentation

#Development ##Directory structure Versioned files

  -+ /
   + doc/       Docs files
   + features/  Behat feature files and bootstrap
   + src/       Module source files
   + tools/     Automated module packager scripts

Not versioned files. Autogenerated.

  -+ /
   + bin/       Behat binaries. Generated by composer.
   + out/       The module package to deploy. Generated by tools/release script.
   + vendor/    Useful libraries. Generated by composer.

##Recommended environment ###Testing server

  1. Install and configure a english Prestashop site running at http://localhost/prestashop/sandbox

If you prefer other location, change the behat.yml file.

  base_url: http://localhost/prestashop/sandbox

Prestashop backoffice must be in english for BDD tests

  1. Rename admin/ Prestashop directory to adm/ and create a employed named test which email test@test.test and password testtest. Set Administrator profile to this user.

If you prefer other admin/ name or other test user credentials, change the features/bootstrap/FeatureContext.php] file.

  define('PRESTASHOP_ADMIN_PATH', '/prestashop/sandbox/adm/');
  define('PRESTASHOP_ADMIN_USER', 'test@test.test');
  define('PRESTASHOP_ADMIN_PASSWORD', 'testtest');
  1. Link src project directory to your Prestashop site modules directory
  ln -s /home/developer/projects/twittercard/src/ /var/www/prestashop/sandbox/modules/twittercard

###BDD Use Composer to install Behat and all necesary files.

  curl -s https://getcomposer.org/installer | php
  ./composer.phar install

Prestashop backoffice must be in english for BDD tests

License

Released under the MIT license: http://www.opensource.org/licenses/MIT

About

Generate the products twitter card header metas

Resources

Stars

Watchers

Forks

Packages

No packages published