Get Free Audit

How to Authorize Prestashop on the Steam Community Platform

Feb 7, 2017

1373 Alexey 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:

Andrey_Dubina

Partner With Us

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


support_prestashop

PrestaShop Support & Maintenance

Take your online store to the next level with BelVG PrestaShop Support & Maintenance

Visit the page

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.

Andrey_Dubina
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

development_prestashop

PrestaShop Development

Take your online store to the next level with BelVG PrestaShop Development

Visit the page
Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. 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 *