PDA

View Full Version : User logged /not


pruthvikb
04-05-06, 03:01 PM
Hi,

How can we find user logged in storefront?. Which variable we have to test and how?

Thank You,

Kumar

latu
04-05-06, 04:20 PM
When a customer is logged in the g.Basket:CUST_ID variable is set to a value greater than zero.

A mvt:if statement could be used to test for this variable:

<mvt:if expr="g.Basket:CUST_ID">
...
<mvt:else>
...
</mvt:if>

When a customer is logged in other variables are also available, such as g.Customer:ID and g.Customer:LOGIN. These can be tested for as well.

For a complete list of these variable try using:
the Store Helper Module
http://store.latu.net/miva-modules-5/LATU-STOREHELPER.html

pruthvikb
04-06-06, 10:28 AM
Thank You for this solution

DesignExtend-MSI
04-06-06, 07:03 PM
And... a quick tip. If you want to use a function already used elsewhere, you can pull up the template for that screen to locate the proper syntax to use.

BlueWaterMedia
12-08-06, 05:18 PM
Thank you so much latu for developing this module. It is by far the most useful module for Miva. And the fact that you offer it for free makes it that much better. This is a must have for anyone developing a Miva cart.

For anyone using this, I would recommend creating a new page (ex: VARS) in your store, assign all items to it and have the 2 mvt:items for this module as the only code on the page. That way you have 1 reference page for all variables.

This just further reinforces the fact that there is no reason Miva shouldn't already have this documentation available on their site or through your cart. The fact that a 3rd party company needs to develop a module to document Miva seems pretty ridiculous to me. But it's great anyway!!!