Announcement

Collapse
No announcement yet.

Checking for Buisness Group

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Checking for Buisness Group

    I see Miva has some Buisness Account functions. I'm hoping someone can help me out simple sample here to see check if a customer belongs to a certain buisness group. Not a programmer so code samples help my little brain.

    A little more context in case it is useful. I have been using Tool Belt's POSTACTION and Tool Kit to check for availability group membership and redirceting after logon to a particular category.

    Code:
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm1|'10 Federal Self Storage'" />
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm2|'CubeSmart'" />
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm3|'Life Storage'" />
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm4|'Public Storage'" />
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm5|'Simply Self Storage'" />
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm6|'SmartStop Self Storage'" />
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm7|'U-Haul'" />
    <mvt:item name="ry_toolbelt" param="availgroup|Customer_Find|g.gm8|'US Storage Centers'" />
    
    <mvt:comment>If found redirect to their default category</mvt:comment>
    
    <mvt:if expr="g.gm1 OR g.gm2 OR g.gm3 OR g.gm4 OR g.gm5 OR g.gm6 OR g.gm7 OR g.gm8">
    <mvt:item name="toolkit" param="headeroutput|Status|301 Moved Permanently" />
    <mvt:item name="toolkit" param="headeroutput|Location|https://www.allfrom1supply.com/partner-portal.html" />
    </mvt:if>

    The only issue is some of these have a lot of customers so we have them in Business Accounts. And in Miva you can add the Business Account to an Availability Group BUT the redirect does not work unless I put the individual customers into the availability group too - so it is not aware of the customer being a member of the business group within the availability group.

    ie John Doe is a customer who is a member of 'Public Storage' Business Account but adding the 'Public Storage' Buisness Account to the Public Storage Availability Group with the groups special categories does not work, not does the redirect above work because it doesn't see the members of the business account.

    Last edited by habreu; 02-05-21, 12:09 PM.
Working...
X