Magento How to check If User Loged In
16772
single,single-post,postid-16772,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-5.9,wpb-js-composer js-comp-ver-4.3.4,vc_responsive

Magento How to check If User Loged In

main_icon_1

06 Aug Magento How to check If User Loged In

Magento How to check If User Loged In

Magento offers a simple way to include the application from an external script but getting the customer session data into your external page can be a real pain. This simple tutorial gives you the information you need to use Magento customer session data in an external script hosted outside of the core Magento folder.

I am currently working on some bespoke web applications and services using Magento as firewall to assess if a user is both logged in and if the user has paid for a particular item.

This means that I can offer paid for access to web applications and VIP areas of websites.

Take a look at the following script:

The code is very simple but there are 2 very important things to be aware of.

– Make sure you have defined a scope for Magento to use.

– Make sure you have called the core session data first before attempting to use the customer session.

Following these steps you should now have the ability of providing restricted access to your web applications and VIP pages.

hope this article will help you, thanks!

Jenny

Jenny Tran
hatran260612@gmail.com
No Comments

Post A Comment