Announcement

Collapse
No announcement yet.

Easily Determine if Customer is Part of Business Account?

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

    Easily Determine if Customer is Part of Business Account?

    So, I've run into a little problem using Business Accounts, and hoping there is a really easy fix for this.

    Is there a conditional similar to detecting whether a customer is in a price or availability group, that allows you to detect if that customer is part of a business account group? I know it must be in there somewhere, since those price group discounts pass through to those customers who are assigned to the business account (and who are not already part of that price group), but I cannot find the correct expression. It's not a huge deal if there isn't a way; I will simply have to assign those customers to the same price group to further segregate them from other customers, but it would be nice if I could just detect if they're part of that umbrella business account group instead.

    Thanks for any ideas!

    #2
    Not positive, but I checked a site we work on using our Inspector module (finds miva variables) and I don't see any variable that represents a "business account" associated with a customer account. My guess is that this is ONLY something that exists in the admin.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Interesting. I wonder how the engine knows what price group discounts to apply without assigning some kind of variable to the customer (that isn't price group, since those customers do not seem to throw price group variables when they are only part of a business account). I think for now I am just stuck assigning those customers to the price group itself so we can identify them throughout the site.

      Thank you for the reply, Bruce!

      Comment


        #4
        I had not choice but to find this info.
        I found it by luck more than anything. I have no guarantees. But basically this is what I found:

        Code:
        <mvt:if expr="g.basket:cust_id">
        <mvt:do file="g.Module_Feature_CUS_DB" name="l.success" value="Customer_Load_ID(g.basket:cust_id, l.cust_obj_data)" />
        <mvt:do file="g.Module_Feature_CUS_DB" name="l.result_account" value="CustomerAndBusinessAccount_Load_CustomerID( g.basket:cust_id, l.cust_obj_data, l.settings:business_account)" />
        &mvt:business_account:title;
        </mvt:if>
        First it gets the entire customer object and then passes that and the customer ID to the CustomerAndBusinessAccount_Load_CustomerID.

        The "CustomerAndBusinessAccount_Load_CustomerID" API is not listed here https://docs.miva.com/api-functions (unless I'm totally blind) Can this API please be added to the API functions page? Brennan


        Colin Puttick
        Miva Web Developer @ Glendale Designs

        Comment

        Working...
        X