Get Free Audit

User Account In Prestashop

Jul 4, 2013

1357 Aliaksandr Simonchik

User Account In Prestashop

Classes

Since My Account is intended exclusively for processing personal data of the current customer, the controller operates in conjunction with a class-model Customer. This model handles not only such properties as Lastname, Firstname, Email and others, but also such as a set of groups of the current customer and addresses (shipping, billing). The following main methods interact with these properties:

Settings

Settings are configured under the “Preferences -> Customers” menu section which is located in the administration section of the store.

1

Controllers

My Account main page.

2

It is generated by the controller MyAссоuntCоntrоller:

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


As seen from the piece of code above, the page uses the template my-account.tpl .

From this page you can follow down 5 links:

  1. Order history and details. This page is responsible for the complete order history. It is generated by the controller HistoryController.
  2. My credit slips. A “credit slip” is given to the customer when he’s returned a product. Controller – OrderSlipCоntrоller.
  3. My addresses. Managing customer addresses.Controller – AddressCоntrоller.
  4. My personal information. Managing personal information.
  5. My favorite products. The module My Favorite Products.

If a customer is not logged in, he will be redirected to the controller AuthCоntrоller.

The method Context::getContext()->customer->isLogged() can help you to verify if a customer is logged in.

Hooks

To display additional link in My Account, you can use the hook displаyCustоmerAссоunt.

The hook displayMyAccountBlock is used to output data into the block My Account. This block is located in the site’s footer.

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 *