How to Authorize Prestashop on the Steam Community Platform

Feb 7, 2017172Alexey Homiakov
How to Authorize Prestashop on the Steam Community Platform

This article is dedicated to the authorization process for Prestashop on Steam, specifically, to the SteamCommunity platform.

Steam is a game and software digital distribution service.

If you are going to sell games, registration keys, skins or any other Steam products through Prestashop you will need to know user’s Steam ID.

So, let’s begin. First we create a new module SteamLogin in the file  /modules/steamlogin/config.xml

Next, create the main module file /modules/steamlogin/steamlogin.php.  Everything is pretty basic here so we will start from the constructor.

Then we will need a Steam Key to register in SteamCommunity and to generate an URL. Let’s make the following module set-up:

We will also need to create a table to save SteamCommunity users data. For that let’s create the file /modules/steamlogin/sql_install.php and add the install() method to the main module file.

Next, create a new SteamCustomer.php  class and connect it to the main file.

The class SteamCustomer will contain such methods as: creating a new user, getting user’s ID by his Steam ID and vice versa.

Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

We will require the following hooks:

We will use hookDisplayAdminCustomers to output the info in the admin panel:

The template admin.tpl for the hook hookDisplayAdminCustomers contains the following:

How to Authorize Prestashop on the Steam Community Platform

Next, we will need to add the button that will let us authorize in SteamCommunity. For that we will use hookDisplayHeader.

Next we verify whether a user profile is already present in the system and if not – generate an url in SteamCommunity.

The button template:

After the successful registration and in case of absense of such a user profile in Prestashop we are forwarded to the Prestashop registration form.

How to Authorize Prestashop on the Steam Community Platform

Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Andrey

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *