Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

PrestaShop

Add Apple Wallet and Google Wallet “Add to Wallet” buttons to a PrestaShop storefront using a module, server-side HMAC signing, and The Wallet Crew SDK.

This guide adds an “Add to Wallet” button to the My Account area of PrestaShop, for a loyalty or membership pass (or a wallet gift card), using an identifier available in the PrestaShop customer session.

PrestaShop My Account page showing an Add to Wallet button next to the loyalty information
Target result: one “Add to Wallet” button rendered for the logged-in customer in My Account.

PrestaShop storefront customization is usually done through modules and theme overrides. This guide focuses on a module-based approach to keep secrets server-side and keep the integration maintainable during theme updates.

How it works

The SDK, the HMAC rule, caching and CSP are explained in How the Add to Wallet button works. This guide uses the PrestaShop customer id as the external identifier key prestashop.customerId.

Prerequisites

  • A pass template and pass issuance already configured in The Wallet Crew.

  • The Wallet Crew tenant id available (used by the SDK script URL).

  • A stable identifier available on authenticated pages.

  • An external identifier key name agreed during onboarding.

The stable identifier is often the PrestaShop customer id. A project can also use a CRM id if it is stored on the customer entity and stays stable over time.

Where the button goes

Common placements are:

  • The My Account dashboard, next to the loyalty or membership number.

  • A dedicated Wallet / Loyalty page in the account area.

  • A gift card list page, with one button per gift card.

Hook availability depends on the theme and PrestaShop version. Many projects use a module hook for the account dashboard. Some projects use a theme override to place the button in a specific section.

Setup steps

1

Choose the external identifier contract

Identifier keys should stay stable over time (example: prestashop.customerId). In the attribute, the key is written prestashop.customer_Id: see How the Add to Wallet button works. The prefix neostore is the platform's former name and is kept in technical identifiers.

If The Wallet Crew tenant already uses a mixed-case key, changing it can affect existing installations. Treat this as a migration topic.

2

Store tenant configuration and secret server-side

The tenant id can be used client-side. The HMAC secret must remain server-side.

Common approaches in PrestaShop deployments are:

  • Environment variables injected by the hosting platform.

  • A server-side configuration store managed by the module, with strict access control in the PrestaShop back office.

3

Build a small module that renders the button

The module typically:

  • Registers on an account-related hook, or provides a small controller for a dedicated account page.

  • Reads the logged-in customer id from the session context.

  • Computes the HMAC using the server-side secret.

  • Assigns tenant id, pass template, identifier value, and HMAC to the template variables.

Validate the result

Follow the validation steps of the e-commerce overview.

Troubleshooting

See the troubleshooting checks of the e-commerce overview.

FAQ

Does this require a custom PrestaShop module?

A theme override can be enough when server-side values are already available in the template context. A dedicated module is usually preferred. It keeps HMAC computation out of theme templates and centralizes secret loading.

Last updated